Re: Variable number of arguments

2018-12-18 Thread dieter
F Massion writes: > My script is used by a web interface which gets some parameters from a form. > The parameters are passed on as arguments like this: > > (...) > def start(self, _Inputfile ,_Outputfile ,_Stopwordsfile) > > As long as the number of arguments is set (i.e. 3), there are no

RE: Variable number of arguments

2018-12-17 Thread David Raymond
argparse works fine on 3.x https://docs.python.org/3.6/library/argparse.html You can't really have back to back _positional_ arguments with nargs = "+" as it won't be able to tell where you meant one group to end and the next to begin. You'd have to call it with switches like script.py -if