Regarding your second question, "tips/tricks to developing Python Gui's", I recently posted a similar question to the wxPython user group. Although my question was aimed at wxPython users, I believe that the same issues are involved when using TkInter.
Below is a summary of that discussion. Note that wxDeveloper and Boa Constructor do not produce output for TkInter, but you may be able to use the debugger in Boa Constructor. I wouldn't bet on it though. You'll may have better luck with Wing IDE, if you don't mind forking over the dough.
Q: I'd like to start a brief discussion on the following topic: What tools/IDE's are you folks using to develop/debug wxPython applications?
A1: I'm primarily developing on and for Windows. My favorite editor is SciTE, but occasionally I've had it crash when trying to execute a python application. For this reason, I execute the application outside of the editor. For difficult debugging, I use Pythonwin, which I've found can be used to debug wxPython apps, but only with a single execution of the app. After the app exits, I have to restart Pythonwin, or it will crash by itself. Other than this annoying problem, pythonwin works okay for me. Often, it's not worth opening up Pythonwin, so I'll just use print statements to debug. I've also occasionally been using wxDeveloper for laying out dialog boxes.
A2: I develop with vim and debug mostly using print statements and logging windows.
Incredibly primitive, no? Fortunately, in an interpretive language like Python,
it's a relatively productive method. Plus, it works on Windows 2000 AND on
Linux via an ssh session.
A3: Wing IDE. Worth the $ a hundred times over! Big advantage: executes your app in another process. Idle and Pythonwin do not; AFAIK.
Wing IDE does not have a dialog editor, I use
wxDesigner.
A4: I am using boa-constructor available from sourceforge. The debugging capabilities of this tool is incredible as well as the editor,form designer,zope designer etc. I highly recommend this tool for wxPython work
A5: The only problem about boa is that not every facility is supported, and then you have to mix your own code, with boa's code, which easily can be a mess. And besides that, are boa not very stable? When i used it, i found my self restarting the application all the time, + a lot of bugs etc.
A6: I am using the CVS version, we are 4 developers using it all the time for big in-house projects. Yes, it does occasionally crash. This happens about once a day, if that much. We are using it under Linux and Windows. You don't have to mix your code with Boa's code,
just stay away from the methods it generates and you are Ok. I have looked at various other options in the Open source community for a good development environment for wxPython and Boa came up number 1 every time. I must admit that it was very unstable under Linux at the end of last year, but it has gone a long way since then. It is definitely worth a look at this point in time, especially debugging.
-----Original Message-----
From: Edward Zdankiewicz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 28, 2002 7:28 PM
To: [EMAIL PROTECTED]
Subject: retrieving from standard out from child processes
My first open question to the internet:
I am using python (v2.1) to (among other things) launch a seperate process
using popen4. The seperate process is a c++ executable, running under linux
or Windows. The simulation is meant to run for some time, idealy overnight.
I would like to capture the data sent to standard out and standard error
(from the child process) and display it in a TkInter Text Edit widget in
real time. As it stands I click the start button and have to wait a
...LONG.... time, for the child process to terminate, before I can capture
the data and update the display.
In the compile/test phase of development this is a pain since I don't know
if something broke or if the simulation is still running (infinte loop
etc...).
I was wondering if there is a 'best practice way', an easy way, a built in
way, to capture data coming out a child process' standard and error outputs.
Also, I have noticed that it can be difficult to develop TkInter based apps
while working within IDLE or PythonWin. Presumably this is because these
both use Tkinter. Is there any place to look for tips/tricks to developing
Python Gui's using these tools while still being able to run the final build
independently of these tools?
Edward Zdankiewicz
[EMAIL PROTECTED]