title: start a python script as soon as power is supplied
body: <p>I work on raspberry pi via SSH session, model B raspbian 
  I want the  python script to run as soon as I plug in the power supply to my raspberry pi without connecting the ethernet cable.</p>
  
  <p>I have found people asking about starting the script on boot up and what I found is to add the command in rc.local so I did
  it looks like that now </p>
  
  <pre><code>    #!/bin/sh -e
  #
  # rc.local
  #
  # This script is executed at the end of each multiuser runlevel.
  # Make sure that the script will "exit 0" on success or any other
  # value on error.
  #
  # In order to enable or disable this script just change the execution
  # bits.
  #
  # By default this script does nothing.
  
  # Print the IP address
  _IP=$(hostname -I) || true
  if [ "$_IP" ]; then
    printf "My IP address is %s\n" "$_IP"
  fi
  sudo python tt3.py  --cascade=s.xml 0 
  exit 0
  </code></pre>
  
  <p>but it doest work neither on plug in power supply or on starting up the SSH session </p>