title: How can I run my python script from the terminal in Mac OS X without having to type the full path?
body: <p>I'm on Mac OS 10.6 Snow Leopard and I'm trying to add a directory to my PATH variable so I can run a tiny script I wrote by just typing: python alarm.py at the terminal prompt.</p>
  
  <p>I put the path in my .profile file and it seems to show up when I echo $PATH, but python still can't find script the that I've put in that directory. </p>
  
  <p>Here's the contents of my .profile file in my home directory:</p>
  
  <pre><code>~ toby$ vim .profile 
  export PATH=/Users/tobylieven/Documents/my_scripts:$PATH
  </code></pre>
  
  <p>Here's the output of echo $PATH, where all seems well:</p>
  
  <pre><code>~ toby$ echo $PATH
  /Users/tobylieven/Documents/my_scripts:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
  </code></pre>
  
  <p>Here's the script I'm trying to run:</p>
  
  <pre><code>~ toby$ ls /Users/tobylieven/Documents/my_scripts 
  -rwxrwxrwx@ 1 tobylieven  staff  276 17 Jan 21:17 alarm.py
  </code></pre>
  
  <p>Here's the command I'm trying to use to run the script and the fail message I'm getting instead:</p>
  
  <pre><code>~ toby$ python alarm.py 
  python: can't open file 'alarm.py': [Errno 2] No such file or directory
  </code></pre>
  
  <p>If anyone has an idea what I might be doing wrong, that'd be great. 
  Thanks a lot. </p>