python + bash + new user

Joyce Stack joyce at netcard.com
Thu Jul 22 19:50:26 EDT 1999


Carel,

I did exactly as you said and chmod's etc but it just says that it doesnt recognise
"./simple.py" as a command.???..what am i doing work?? anyother simple programs will
work...

Joyce


Carel Fellinger wrote:

> Joyce Stack <joyce at netcard.com> wrote:
> > Sorry about being vague...i meant the Bash prompt...i have gotten other simple
> > programs to work...changed mode and executed the programs ...but i dont know how to
> > run the program and pass a variable at the same time...
>
> Gerrit showed you how to pass a command-line-script to python, and I will
> show how to pass parameters to your script, you can ofcourse combine the two:)
>
>         $ cat simple.py
>         #!/usr/bin/python
>         from sys import argv
>         print "I'll show you my parameters:"
>         for p in argv:
>                 print p
>
>         $ ./simple.py one parameter and others
>         ./simple.py
>         one
>         parameter
>         and
>         others
>
> hope this helps
>
> --
> groetjes, carel





More information about the Python-list mailing list