I found an example script  I got to work for WX.  I
guessed that the ws.app had to be deleted to plot
again.  Here it is (the part that runs the code and
creates the WX.app:

if __name__ == '__main__':
    app = wx.PySimpleApp(0)
    frame = PlotFigure()
    frame.plot_data()
    frame.Show()
    app.MainLoop()
    #must delete app before reusing for wxPython
    del app    #  <<---- THE CRUCIAL STEP
    print "done with plot 1"
    
    app = wx.PySimpleApp(0)
    frame = PlotFigure()
    frame.plot_data()
    frame.Show()
    app.MainLoop()
    print "done with plot 2"


Without the delete you get a crash/hang.


 


-- Lou Pecora
      My views are my own.


 
____________________________________________________________________________________
We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to