how to pass parameter to a python script when running it in the interactive shell?
David Tweet
davidtweet at gmail.com
Wed Dec 5 22:13:27 EST 2007
This should work:
python -i myscript.py --cl --cs 5 --ce 6 --bw 7 --set 1
On Dec 5, 2007 6:31 PM, wang frank <fw3 at hotmail.co.jp> wrote:
>
>
> Hi,
>
> I am debugging a python script which takes a set of paramters. In the
> regular shell, I type:
>
> myscript.py --cl --cs 5 --ce 6 --bw 7 --set 1
>
> However I want to debug the code in the interactive python shell, I do not
> know how to run it. I know that
> execfile("myscript.py")
>
> will run the script. But I could not figure out how to pass those
> parameters.
>
> Could some one help me to find out the solution?
>
> Thanks
>
> Frank
>
> ________________________________
> ほら、変わったでしょ? マイクロソフトといっしょに、次のデジタルライフへ http://go.windowslive.jp/
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
-David
More information about the Python-list
mailing list