#13 ability to parse other list than sys.argv

closed
5
2006-06-13
2004-12-30
Anonymous
No

It should be possible to parse an option list other than
sys.argv with optik/optparse. optik is such a powerful
tool that it would be a pity, if I could not use it for - for
example - an option list read from a file.

In the current implementation one could move this list
to sys.argv and restore sys.argv after option parsing. But
I think that's not a good design.

I suggest to add an optional parameter "source" to the
parse_args() method with a default value of None, in
which parse_args() uses sys.argv as source. One could
also use sys.argv as the default value for source, but I
am not sure if the calling module would have to import
sys in this case.

Discussion

  • Greg Ward

    Greg Ward - 2006-06-13
    • labels: --> misc features
    • assigned_to: nobody --> gward
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks