I use optparse wich can take some getting used to in the beginnning, but it help you easily create very powerful command line options. I is shipped with th epython distro. As soon as I get an example I wrote, I will post it to the list...
Hugo Joseph Quigley wrote: > How do I add an argument too my program (with sys.argv) so that at a > console I can type: > > python foo.py -info > > or > python foo.py open /home/joe/foo.txt > > Thanks, > Joe > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor