[wxPython] serial communication using events

I am looking for the best avenue to take to build an app
that monitors a serial port and displays the text whenever any arrives in a
window. Also, I need to occasionally type text to the window and have it
sent to the same comm port. I have looked at the contrib serial package
with wxWindows, but as I understand, it does not generate events back to the MainLoop().
Is it necessary to have events to do this or is there a way around this? Or is
there a package available that handles this.

Ronnie Jones

Has anyone ever made successful a standalone compilation which
included pyopengl? (GL and Glu)
I couldnt get it working with py2exe, does it work with the
"installer"?
Is it maybe possible by using MESA?

Lucian

It has been on my todo list for ages, haven't actually got around to doing it. Have you tried and had it fail, or was it just a general question?

Good luck,
Mike

2240601 wrote:

···

Has anyone ever made successful a standalone compilation which
included pyopengl? (GL and Glu)
I couldnt get it working with py2exe, does it work with the
"installer"?
Is it maybe possible by using MESA?

Lucian

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

--
_______________________________________
   Mike C. Fletcher
   http://members.rogers.com/mcfletch/

Hello Mike,

I tried it. Also with different version of py2exe. There where
different modules which py2exe didn't find. It seems it is possible to
get it work as long as one does not use GLU, but I need ortho2d and
circles.

If someone could fix it, or give me advice how to died (maybe with a
different program than py2exe) I would appreciate that.

Lucian

Saturday, July 6, 2002, 6:58:09 PM, you wrote:

···

It has been on my todo list for ages, haven't actually got around to
doing it. Have you tried and had it fail, or was it just a general
question?

Good luck,
Mike

2240601 wrote:

Has anyone ever made successful a standalone compilation which
included pyopengl? (GL and Glu)
I couldnt get it working with py2exe, does it work with the
"installer"?
Is it maybe possible by using MESA?

Lucian

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

--
Best regards,
Lucian mailto:gemes@gmx.at

Ronnie Jones <rjones@clayelectric.com> writes:

I am looking for the best avenue to take to build an app that monitors a
serial port and displays the text whenever any arrives in a window. Also,
I need to occasionally type text to the window and have it sent to the
same comm port. I have looked at the contrib serial package with
wxWindows, but as I understand, it does not generate events back to the
MainLoop(). Is it necessary to have events to do this or is there a way
around this? Or is there a package available that handles this.

Have you had a look at the wxProcess.py demo?

"wxProcess lets you get notified when an asyncronous child process
started by wxExecute terminates, and also to get input/output streams
for the child process's stdout, stderr and stdin.

This demo launches a simple python script that echos back on stdout
lines that it reads from stdin. You can send text to the echo
process' stdin by typing in the lower textctrl and clicking Send.

Clicking the Close Stream button will close the demo's end of the
stdin pipe to the child process. In our case that will cause the
child process to exit its main loop."

Hello,

just to let you know, it is possible to make a compilation of pyopengl
(GL, GLU and GLUT)
and wxpython with the mcmillian installer. But I couldn't yet
successful compile a single stand alone file.

greetings,
Lucian

I am looking for the best avenue to take to build an app that monitors a
serial port and displays the text whenever any arrives in a window. Also,

I

need to occasionally type text to the window and have it sent to the same
comm port. I have looked at the contrib serial package with wxWindows,

but

as I understand, it does not generate events back to the MainLoop(). Is

it

necessary to have events to do this or is there a way around this? Or is
there a package available that handles this.

I seem to recall that there are a few serial comms packages available for
Python. I'd look for one of those and then run it in another thread, you
can then send events to the GUI when data arrives on the port.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

We use pyserial in a wxPython app at work. We had to use it in a python thread, and use wxPython custom events (and wxPostEvent) to send the events to the main loop. Sorry I can't share any code :frowning:

http://pyserial.sourceforge.net

Matthew Sherborne

I forgot to say, to see how to make custom events look in the demo... :slight_smile:

Matthew Sherborne

Okay, I'm afraid I'm somewhat rusty on the McMillan installer. If I understand correctly, you're saying you could get a "compiled" version of your app that included wxPython, GL, GLU, and GLUT which could run as a "standalone" application, but that you couldn't get it to run as a "single file" application (which is a McMillan thing where the DLLs are unpacked from the exe at run time into the exe's directory, then deleted again when the exe exits).

Is that correct? I.e. do you have a working application, but want to get to a single-file version, or do you mean the installer created an application for you, but that it doesn't work once it's "compiled"?

Sorry for not quite grasping the question,
Mike

Lucian wrote:

···

Hello,

just to let you know, it is possible to make a compilation of pyopengl
(GL, GLU and GLUT)
and wxpython with the mcmillian installer. But I couldn't yet
successful compile a single stand alone file.

greetings,
Lucian

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

--
_______________________________________
   Mike C. Fletcher
   http://members.rogers.com/mcfletch/

Hello Mike,

at least I thought I had it. I compiled it into a single directory.

The INSTALLER puts all the dll's into the directory, including gl,glu and
glut. I could still run my application, and was very happy about that.

In the meantime I was trying to play the program on a different computer,
and I didn't get it to run. It complains that it can not load a dll
from a non attached drive???

I used a filemonitor (a program which monitors access to the
filesystem) and could figure out that the installer hadn't included
all necessary files, but accessed the original files stored in the
my python directory on drive F:. So as I transferred it to the other
computer, the program couldn't find does files on the non existing
drive F: and was not able to start up. I even figured out that it
hadn't included all the files necessary for wxpython.

I did the compilation on windows XP and tried to run the program on
win98.

So I am very sad now, and would very appreciate if anyone could
give me some advice how I have to set up the spec file. So I will get
at least wxpython included. Than I will look further how to compile
the opengl stuff.

It's a pity that py2exe doesn't swallow the pyopengl stuff, otherwise
it works pretty well.

Another question: I read some messages that py2exe will compile gl and
glut without problem, but gets into trouble with glut. Wouldn't it
possible to compile gl and glut separately and put them together
afterwards?

Lucian

Tuesday, July 9, 2002, 10:35:33 AM, you wrote:

···

Okay, I'm afraid I'm somewhat rusty on the McMillan installer. If I
understand correctly, you're saying you could get a "compiled" version
of your app that included wxPython, GL, GLU, and GLUT which could run as
a "standalone" application, but that you couldn't get it to run as a
"single file" application (which is a McMillan thing where the DLLs are
unpacked from the exe at run time into the exe's directory, then deleted
again when the exe exits).

Is that correct? I.e. do you have a working application, but want to
get to a single-file version, or do you mean the installer created an
application for you, but that it doesn't work once it's "compiled"?

Sorry for not quite grasping the question,
Mike

Lucian wrote:

Hello,

just to let you know, it is possible to make a compilation of pyopengl
(GL, GLU and GLUT)
and wxpython with the mcmillian installer. But I couldn't yet
successful compile a single stand alone file.

greetings,
Lucian

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

--
Best regards,
Lucian mailto:gemes@gmx.at