wxOptParse

I released a FLOSS program called wxOptParse which allows you to run a Python program that uses optparse, which is a standard Python module that handles command line parameters with a GUI dialog instead of the command line.
Something like:
usage: mytest.py [options]

options:
-h, --help show this help message and exit
-f FILENAME, --file=FILENAME
Enter a filename
-p PATH, --path=PATH Enter a path
-2 FILENAME2, --noHelp=FILENAME2
-n NUMBER, --count=NUMBER
Enter a number
-m FLOAT, --float=FLOAT
Enter a floating point number
-b, --bool Switch to true
--nbool Switch to false
--choice=CHOICE Choice

Screenshot

One day I realized that I could do this with Python fairly easily. In fact the initial program just took a few hours to get working. There was a bunch of details that made it take a bit longer to finally release. The optparse module is great and makes a complicated set of parameters easy to code. Now you have one more reason to use optparse.
Take a look.

Comments

jaco said…
Great idea Scott, downloading and trying to install I noticed I've fallen behind somewhat. The whole package egg thing is new to me, I will definately have a look at that.
Unfortunately in attempting to run the script I get a wx version error. I am using wxPyton 2.6, Python 2.3.5. I've noticed you've not tested Python 2.3, but this does not seem to be related?
cheers
jaco
Scott Kirkwood said…
Send me the error message and maybe I can figure it out. I believe I need
wxPython > 2.5.x because I use the BIND() function. If it's the lines

import wxversion
wxversion.select("2.5.3")

Maybe you can just comment it out.

Popular posts from this blog

Seven Segment Display in Inkscape

Shortest Sudoku solver in Python