wxPython looses function "wxPython.wx.miscc"

Cliff Wells clifford.wells at comcast.net
Tue Jul 22 21:59:43 EDT 2003


On Tue, 2003-07-22 at 17:54, Anand wrote:
> I am calling a python script from LabVIEW. This is achieved by making
> a dll call to python22.dll. It works perfectly well for most of my
> code. I now want to throwup dialog boxes from python. It works just
> fine if i run the code once.
> 
> but when i call the same piece of code the second time,
> wxPython.wx.miscc does not exist for some reason. I dont know how this
> gets deleted. I guess this happens during some kind of clean up. The
> code that i use for showing a dialog box is as follows:
> 
> from wxPython.wx import *
>             app = wxPySimpleApp()
>             dlg = wxMessageDialog(None, Text,
>                           'A Message Box', wxOK | wxICON_INFORMATION)
>                           #wxYES_NO | wxNO_DEFAULT | wxCANCEL |
> wxICON_INFORMATION)
>             dlg.ShowModal()
>             dlg.Destroy()
>             app.MainLoop()
> 
> when i call it the second time i get the following error:
> 
> line 1139, in showDialog
>     from wxPython.wx import *
>   File "C:\PROGRA~1\Python22\lib\site-packages\wxPython\wx.py", line
> 4, in ?
>     from misc import *
>   File "C:\PROGRA~1\Python22\Lib\site-packages\wxPython\misc.py", line
> 2, in ?
>     import miscc
> ImportError: No module named miscc

Is your wxApp.MainLoop() exiting?   I think there is some cleanup code
that happens immediately after that.

You should post your question to the wxPython list:

http://www.wxpython.org/maillist.php

Cliff

-- 
Should I stand midst the breakers, Should I lie with Death my bride?
                                                  -This Mortal Coil






More information about the Python-list mailing list