[Pythonmac-SIG] Yet another problem with path

Nehemiah Dacres vivacarlie at gmail.com
Fri Aug 8 16:11:55 CEST 2008


have all of you forgotten that the current directory isn't in the path
either? to excecute a script in the current directory at the command line,
you type at the '$'
$ ./MyScript
else you do
$python MyScript
but then you wouldn't need the 'shebang' line '#!/bin/env python' or
'#!/usr/bin/python

On Thu, Aug 7, 2008 at 9:20 PM, Pascal Bompard <pascal.bompard at gmail.com>wrote:

> Thank you! This solved it for me.
>
> I knew it had to be something as ridiculously n00bish as keeping "python"
> in the script call.
>
> On 07/08/2008, at 9:58 PM, Mike Covill wrote:
>
>  You should be able to execute your script by typing just your script name
>> from anywhere, leave out "python":
>>
>> Administrator:~ pascal$ test.py
>>
>> in this case test.py is the 'executable', and your system will look for it
>> using your PATH setting.
>>
>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>



-- 

"lalalalala! it's not broken because I can use it"

http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&mode=thread&cid=15927703
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20080808/7d9c87fa/attachment.htm>


More information about the Pythonmac-SIG mailing list