Notes on Python Fabric 0.9b1
saltycrane.com
saltycrane.com
One quick note. I think it's a good idea to explain that, since from the command line you are basically calling functions inside the fabfile.py, this allows you to define different environments. Something like:
def env1(): env.some_property = 'hehe'
def env2(): env.some_property = 'haha'
def deploy(): put('/%s/file.prop', '/somewhere_in_the_server/')
If you then run 'fab env1 deploy' you will copy the file under 'hehe' to the server. If you use env2 you will copy the other one. You are basically overriding the env variable. You can do the same to configure different paths for different target servers.
Really cool stuff :D
$str = 'Like this.';
echo $str;
http://news.ycombinator.com/formatdoc