Python deploy function using Fabric
Using % for string formatting is deprecated. You should be using str.format() instead. Here's how one would use str.format(): print "Hello {0}.".format("world"). str.format() also supports using keyword arguments. Here's an example of that: print "Hello {word}.".format(word="world").
Near the end of the function deploy, underneath the if block with the condition os.path.isfile(local_file), you have comments above every line. These are unnecessary and can be removed.
Finally, I'm not sure why you have square brackets, [], around the value of the variable env.key_filename. If these aren't needed, they can be removed.