Windows GUI - which way?
Spencer Ernest Doidge
spencer at efn.org
Sat Mar 2 16:27:06 EST 2002
Thank you for this reply.
I have another question that you sound unusually well-qualified to answer:
I want to maintain and use a library of Python scripts. I want to invoke
any script from this library by using a GUI app. The script itself would
have no GUI features. It would be sending and receiving serial port
messages. (This is like the script I am already running.)
Some frequently-used scripts would be invoked directly from a Tools menu,
others would be named in a File/Open dialog. I want to begin execution of
the script by using either a menu, a dialog, or a toolbar icon. When the
execution begins, I want to be able to abort the script at any time by
either a dialog button, a menu item, or a toolbar icon.
If I write the GUI app all in Python, is it a simple matter to, say, load
and run the script in its own thread, and have it be responsive to a
signal from the main thread telling it to abort?
Those are the must-have features.
For nice-to-haves, it would be nice to display some sort of output, even a
progress control (thermometer, or whatever one calls it), or some text in
an output window, the way it's done in Visual C++ when you build a
project.
Do you know of straightforward ways to accomplish the must-haves?
What about the nice-to-haves?
Thanks very much in advance for taking the time to read and reply to
this post.
Spencer Doidge
www.spencerdoidge.com
On Thu, 28 Feb 2002, Peter Hansen wrote:
> Spencer Doidge wrote:
> >
> > I have a nice script running and doing useful work--in the Windows console
> > mode. [...] I'd like to make this palatable for others around the company
> > to use, and that means Windows GUI.
> > So should I write up a program in my favorite style, Win32 API, and embed
> > Python in it?
> > Or should I write the whole thing in Python?
> >
> > Would somebody like to comment on the pros and cons?
>
> Write the whole thing in Python (my preference would be with wxPython)
> and package it up with py2exe or equivalent. Use a standard
> installer to distribute it and no one in the company will ever
> know it was written with Python. Except for the higher reliability.
> And your greater responsiveness in implementing feature requests
> quickly. And how quickly you got it to them. Etc. :-)
>
> (We've written several utilities with wxPython and serial ports
> running under Windows. So far the wxPython side of things
> is quite primitive since we're still learning, but even in
> their current state they're quite acceptable, and have no
> real issues the way a more traditionally developed program
> (i.e. Windows GUI with C/C++ or whatever) would have.
>
> -Peter
>
More information about the Python-list
mailing list