I am a newbie to python, numpy, and matplotlib, and I like what I have 
seen so far.  I have been wishing for a long time there was an open 
alternative to matlab, and when I heard about numpy and matplotlib, I 
tried them out immediately.

Anyway, I am running python embedded in a C++ WX app.  I just discovered 
matplotlib, so I tried it out.  From the interactive python shell 
(vanilla FC5 linux install of python and matplotlib) everything works 
fine.  The show() command blocks.

In my application, I use the PyRun_SimpleFile command to execute user 
selected python files on a separate thread.  That has seemed to work 
fine for several weeks on scripts using numpy and such.  When I use 
matplotlib, however, the show() command does not block, and then strange 
things happen when I try to close the Figure window.  On the first close 
it reopens the window right back up.  On the second close attempt it 
closes (gdb splits out zombie thread messages), and then if I try to 
execute another script with a show() command in it it sometimes seg 
faults, sometimes works, but in general causes my program to behave 
strangely.

So my question is: what is the correct way to setup python and/or 
matplotlib when running python embedded?  Is there a way to make show() 
blocking when using embedded python (I am not sure this will solve any 
problems).

Thanks,
Lane Brooks


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to