[Tutor] input and output files from terminal

v2punkt0 at googlemail.com v2punkt0 at googlemail.com
Mon Apr 14 19:14:11 CEST 2008


look at the OptParse module, with this u can easily realize such things.
http://docs.python.org/lib/module-optparse.html


On Mon, Apr 14, 2008 at 12:55:07PM -0400, Brain Stormer wrote:
> I have a python program which works fine when run using idle but I would
> like call the program from the terminal.
> 
> python test.py -i inputfile -o outputfile
> 
> I tried with raw_input but that only works in idle.  Can this be achieved?
> Thanks

> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list