[Tutor] sending both a filename and an argument from the command line

Alan Gauld alan.gauld at blueyonder.co.uk
Sun Nov 23 04:16:25 EST 2003


> It seems I can send either a file(s), or arguments to a python
script, but not both:
> I want to do:
>
> python ip.py myfile -i myargument

Python usage is:

 python [option] ... [-c cmd | file | -] [arg] ...

so you need to rearrange your line slightly:

python -i ip.py myargument


The option '-i' must come before the filename and the arguments
to the file must come immediately after the filename.

Alan G.




More information about the Tutor mailing list