Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I have a finished python script, ready for me to use. Now, is there a way to compile it, or something like that, to use in /bin? Or any other way I can just type "thescript" into terminal, instead of "python /Users/username/Library/myScripts/thescript.py" Ideas?

Put:

Code:
#!/usr/bin/env python

on line one of the script (make sure it is the only thing on the line) and add the script to your path (don't put it in /bin though, that is a system directory use /usr/local/bin instead).
 
Put:

Code:
#!/usr/bin/env python

on line one of the script (make sure it is the only thing on the line) and add the script to your path (don't put it in /bin though, that is a system directory use /usr/local/bin instead).

also remember to do a
Code:
chmod +x your_file_name

and if you do put it in /usr/local/bin or wherever, I would make sure root owns it:

sudo chown root:wheel /usr/local/bin/your_file_name
sudo chmod 755 !$
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.