Hello Jeff:
There are many different approaches you can take to communicating
between your telnet code and the text control. One would be to create
the wx.Frame in your main module, and save a reference to it there.
You could then implement a method of the Frame to replace or append
to the wx.TextCtrl.
A more elegant method, in my opinion, is to use pyDispatcher. You set
up a method to receive messages in the GUI code, and a then send a
message in your main code any time you want to update the wx.TextCtrl.
···
On 10/31/05, Jeff Howard <jhoward1@nc.rr.com> wrote:
Hi - I'm new to Python and wxPython. I've written a Python program that
opens some
telnet ports and sends and receives data. I wanted to create a "simple"
window
I could pop-up (Windows and Linux) that I could then write data to in real
time so that
users could see what was transpiring on the telnet ports. The window just
has to have
one scrollable multiline text field and an exit button. These windows need
to pop up
when my program starts and then stay around so I can periodically send text
to them.I've tried a number of times and can get a window to pop up with static,
predefined
text in it but can't figure out a way to pop-up a window and then write to
it dynamically.Below is a modified version of a program I found on the serpia website. I
started with
this (and a number of others) but most examples I've seen are standalone
programs
that I don't see how to access from my existing program. Thanks in advance
for
any help!- Jeff H.