matplotlib+ipython+VISA - more info

Hello again,

Here's a small chunk of code that exhibits the same problem I referred
to in an eariler email, ie it
won't repaint the window after an event has occured on it until the
code is complete.

···

===================================
import MPlot, wx, time,threading,scipy
from scipy import *
app=wx.PySimpleApp()
frame=MPlot.PlotFrame()
frame.Show()
frame.Raise()
frame.plot(rand(100),rand(100))

for i in range(15):
    frame.oplot(rand(100),rand(100))
    time.sleep(1)

====================================

NB The absence of an "app.MainLoop()" call at the end,
since I've called this from ipython, which is supposed to be clever and
automatically the wxPython main loop in another thread automatically (I
read this somewhere). I've tried running multi-threaded stuff from the
regular python shell, but without success.

Any ideas on how to get such a window to at least repaint in spite of
events on it, during replot commands?

Thanks in advance :slight_smile:

Marc

Hi

I'm trying to build 0.86.2 on my Debian box. I changed nothing in setup.py that came with the src tar.gz.

  python setup.py build

runs fine but

  sudo python setup.py install

gives

···

------------------------------------------------------------------------
elcorto@...662...:~/Install/Matplotlib/matplotlib-0.86.2$ sudo python setup.py install
installing data to lib/python2.3/site-packages/matplotlib/mpl-data
pygtk present but import failed
Using default library and include directories for Tcl and Tk because a
Tk window failed to open. You may need to define DISPLAY for Tk to work
so that setup can determine where your libraries are located.

Gtk-WARNING **: cannot open display:
------------------------------------------------------------------------

I found that the pygtk and Tk related messages are produced by try/except clauses which try to import gtk and Tkinter, which works in the normal interactive python and in a script.

My DISPLAY also set:

$ echo $DISPLAY
:0.0

Any hints are appreciated. Many thanks.

cheers,
steve

--
Random number generation is the art of producing pure gibberish as quickly as possible.