Domen Kožar <ielect...@gmail.com> added the comment: I always used optparse like this, using the rargs (maybe this is not main intention, but worked so far):
>>> import optparse >>> parser = optparse.OptionParser() >>> parser.add_option('--test', action='store_true') <Option at 0x7f55bdb32dd0: --test> >>> parser.parse_args(['--test', 'foo', 'foo1', '--', 'foo2', 'foo3']) (<Values at 0x7f55bda89170: {'test': True}>, ['foo', 'foo1', 'foo2', 'foo3']) >>> parser.rargs ['foo2', 'foo3'] >>> parser.largs ['foo', 'foo1'] ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9077> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com