How can I pass command line arguments when python is embedded ???

Werner Schiendl n17999924.temp.werner at neverbox.com
Thu Jan 30 12:45:07 EST 2003


Hi,

you find the command line parameters in sys.argv

e. g.

import sys

for arg in sys.argv:
    print arg

The first item is the name of the script, the remainder are the parameters.

hth
Werner


On Thu, 30 Jan 2003 11:51:32 -0500, Luc <acid_til at yahoo.com> wrote:

> Hello fellow Python users :)
>
> Like the subject says, how can I do it ??? What I want to do is pass a 
> number to the python script file that is to be used to determined when to 
> load from a database.
>
> Thanks in advance for any help.
>
> Luc.
>
>






More information about the Python-list mailing list