wxPython looses function "wxPython.wx.miscc"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anand

    wxPython looses function "wxPython.wx.miscc"

    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.mis cc 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_INFORMAT ION)
    #wxYES_NO | wxNO_DEFAULT | wxCANCEL |
    wxICON_INFORMAT ION)
    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\Py thon22\lib\site-packages\wxPyth on\wx.py", line
    4, in ?
    from misc import *
    File "C:\PROGRA~1\Py thon22\Lib\site-packages\wxPyth on\misc.py", line
    2, in ?
    import miscc
    ImportError: No module named miscc

    is there a solution? What is really happening? i am new to
    WxPython.
  • Cliff Wells

    #2
    Re: wxPython looses function "wxPython. wx.miscc"

    On Tue, 2003-07-22 at 17:54, Anand wrote:[color=blue]
    > 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.mis cc 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_INFORMAT ION)
    > #wxYES_NO | wxNO_DEFAULT | wxCANCEL |
    > wxICON_INFORMAT ION)
    > 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\Py thon22\lib\site-packages\wxPyth on\wx.py", line
    > 4, in ?
    > from misc import *
    > File "C:\PROGRA~1\Py thon22\Lib\site-packages\wxPyth on\misc.py", line
    > 2, in ?
    > import miscc
    > ImportError: No module named miscc[/color]

    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:



    Cliff

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


    Comment

    Working...