Need compile python code

MonkeeSage MonkeeSage at gmail.com
Sat Sep 23 16:13:13 EDT 2006


mistral wrote:
> No, something is wrong there. what I need is just compile one python
> file which will generate html page, with parameters:
> "exec" "python" "-O" "$0" "$@"
>
>  just need simple way do this(script is correct), i will not set any
> patches anywhere, can i do this wrom normal GUI?

Hmmm... Are you talking about _RUNNING_ python scripts? Is that what
you mean by "compile" -- you mean execute? Is that what this broken
shell script means?

"exec" "python" "-O" "$0" "$@"

You don't need exec, the double quote on every word breaks it, and
passing $0 (which is the shell script itself) to python is sure to
break. Try this:

#!/bin/sh
python -O "$@"

Then:

$ run_python.sh file.py arg1 arg2 arg3

Regards,
Jordan




More information about the Python-list mailing list