Parsing options in a PyGTK application

Dear lazyweb, I’m writing an application with Python and GTK+, and I’d like to parse command line arguments. I was thinking of using the PyGTK wrapped version of the Glib option parser, but I can’t find any tutorial for PyObject or application that uses it. Should I just use Python’s optparse instead?

Artigos relacionados:

5 respostas para “Parsing options in a PyGTK application”

    1. F Wolff disse:

      We use optparse in Virtaal (and basically all of the Translate Toolkit). I can’t think of a reason why you wouldn’t want to use that.

    2. No' disse:

      nice alternative: http://code.google.com/p/argparse/ – parses both arguments and options

    3. John Stowers disse:

      Yes, use optparse.

    4. [...] Leonardo Ferreira Fontenelle: Parsing options in a PyGTK application is now available in this link…: News [...]

    5. Alex Willmer disse:

      Another vote for argparse. It does the whole job — positional arguments, and options, sub-commands — with a very nice API. It’s all in a single file, so you can bundle argparse.py, should you choose.

    Deixe uma Resposta


Bad Behavior has blocked 468 access attempts in the last 7 days.