habe hier: http://docs.python.org/release/3.0.1/li ... e-optparse unter "Standard option actions" gelesen:
"If nargs > 1, multiple arguments will be consumed from the command line"
Und wenn ich das mache, bekomme ich einen Fehler:
Code: Alles auswählen
parser.add_option("-l", "--log", dest="log_file", nargs>1, help="Log file")
./neu.py -c lala -l foo bar
File "./neu.py", line 16
parser.add_option("-l", "--log", dest="log_file", nargs>1,
SyntaxError: non-keyword arg after keyword arg
Wuerde ich ueber einen hilfreichen Hinweis sehr freuen.
Viele Gruesse,
Torres