how to run python script from Unix Shell?

Ignacio Vazquez-Abrams ignacio at openservices.net
Thu Sep 6 22:41:37 EDT 2001


On 6 Sep 2001, David wrote:

> Hi there,
>
> Can you help to advise how to run python script from Unix Shell?
> What I am doing is:
> 1)chmod +x  script name
> 2)put #!/usr/bin/python   at first line
> 3)when I type the script name under Shell,
> the message is:
> bash: Script name command not found.
>
> Actually, it works if I type:
> python "script name"
>
> But the problem is I want run it by typing "script name"
>
> Thanks for your help.

You have to call it as follows:

  ./<script name>

-- 
Ignacio Vazquez-Abrams  <ignacio at openservices.net>





More information about the Python-list mailing list