script that parses command line, and execfile('')

Sandip Bhattacharya sandipb at gmail.com
Tue Nov 4 05:55:04 EST 2008


On Nov 4, 12:43 am, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
> def main(argv=None):
>      if argv is None: argv = sys.argv[1:]
>      ...

Wouldn't that make optparse miss the first parameter sys.argv[1]
mistaking it to be the name of the current program?

- Sandip



More information about the Python-list mailing list