On 05/15/2013 08:24 AM, Roy Smith wrote:
In article <kmva9j$1hbk$1...@gwdu112.gwdg.de>,
  Henry Leyh <henry.l...@ipp.mpg.de> wrote:

Is there a simple way to determine which
command line arguments were actually given on the commandline, i.e. does
argparse.ArgumentParser() know which of its namespace members were
actually hit during parse_args().

I think what you're looking for is sys.argv:

$ cat argv.py
import sys
print sys.argv

$ python argv.py foo bar
['argv.py', 'foo', 'bar']


Colin & Roy:
The OP mentioned sys.argv in his original query.

--
DaveA
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to