[Tutor] Running a script from another folder
Shawn Milochik
Shawn at milochik.com
Wed Nov 12 20:35:30 CET 2008
On Wed, Nov 12, 2008 at 12:58 PM, greg whittier <greg at thewhittiers.com> wrote:
>> it looks like you're on linux - so at the beginning of your script put
>> #!/usr/bin/env python (I believe) and then chmod +x myscript.py
>>
>> then you can call it from the command line.
>>
>
> You'll also need to make sure ~myID/bin is in your PATH.
> _
This is the answer, assuming you have the shebang line and executable
flags mentioned above.
Method (assuming you are using bash):
Add this to your .bashrc file in your home directory:
export PATH=$PATH:${HOME}/bin
I used ${HOME} instead of ~ to make this more portable. However, if
your system doesn't work that way, use the ~ or the full path.
More information about the Tutor
mailing list