title: Running Fabric with Python script together
body: <p>I see most of the Fabric API are use together with function.</p>
  
  <p>Example of file (sample.py):</p>
  
  <pre><code>from fabric.api import *
  print "Hello"
  
  def deploy():
      with settings(hosts_string="Remote", user = "ubuntu", key_filename="/home/ubuntu/key.pem"):
          put('/home/localuser/sample.sh', '/home/ubuntu/')
          run('bash /home/ubuntu/sample.sh')
  </code></pre>
  
  <p>I run the command to execute</p>
  
  <pre><code>fab deploy
  </code></pre>
  
  <p>Is it possible to running Fabric in Main Method. So when I run it as a python script, the fabric will be executed.</p>
  
  <pre><code>python ./sample.py
  </code></pre>
  
  <p>Thanks!</p>