[Tutor] Making a script part of the terminal

ralf at schoenian-online.de ralf at schoenian-online.de
Fri May 20 20:07:16 CEST 2011


Hello Michael,
 
first you have to give your script an executable bit. Just type chmod +x
your_script.py
Furhtermore, your script has to be in a directory that is also part of your
search path. Type in echo $PATH to see how your path is set. You can either link
or copy your script to an approprate location.
 
Regards,
Ralf 
 



michael scott <jigenbakuda at yahoo.com> hat am 20. Mai 2011 um 19:43 geschrieben:


> 
> Okay, my title might be undescriptive, let me try to explain it better. I want
> to take a script I've written and make it usable by typing its name in the
> terminal. Perfect example is the python interpreter. You just type in the word
> python to the terminal and then the interpreter runs. I know other programs
> can do this as well (like mozilla or nautilus or rhythmbox).  So how do I make
> my scripts executable from the terminal?
> 
>  ----
> What is it about you... that intrigues me so?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110520/d2bf28eb/attachment.html>


More information about the Tutor mailing list