[PyKDE] How to do *INTERACTIVE* plotting with PyQt (or PyQwt)

Boudewijn Rempt boud at valdyas.org
Sat Sep 7 11:17:00 BST 2002

I'd like to be sure I understand your requirements -- I've been
hacking a bit, but it's quite possible that what I've done
doesn't fit them. So, to summarize, you want:

* One command window where the user can type in Python and commands
* One or more windows where the results of those commands can be drawn.
* The results of those commands must be computed asynchronously: as soon
as the user types enter, the command must be dispatched to the window and
control given back to the user.
* The windows must be capable of performing long running commands 
independently, without hindering the other windows.

Is that about right?

If you look at the attached little script you see a main window with
a few buttons (I was too lazy to code up a command line interpreter,
but the principle is the same, of course). You can add new windows,
but the commands always affect the latest window (I was too lazy
to code up focus management, too). One of the buttons starts a long
running thread, the other buttons directly paints a bit on the newest
window. Note that every window is QWidget: this is not necessary,
you could use any QWidget derived class, as long as there's only one
QApplication instance in your Python process.

This looks more or less like what you describe, I think.

Boudewijn Rempt | http://www.valdyas.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plotter.py
Type: text/x-python
Size: 3302 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020907/a9aeef2d/plotter.py

More information about the PyQt mailing list