wxPython looses function "wxPython.wx.miscc"

Discussion in 'Python' started by Anand, Jul 23, 2003.

  1. Anand

    Anand Guest

    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 there a solution? What is really happening? i am new to
    WxPython.
     
    Anand, Jul 23, 2003
    #1
    1. Advertising

  2. Anand

    Cliff Wells Guest

    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
     
    Cliff Wells, Jul 23, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    1,003
  2. =?Utf-8?B?QW5kcmV3IFBhcmtz?=

    Context looses the ISitePrincipal...

    =?Utf-8?B?QW5kcmV3IFBhcmtz?=, Mar 5, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    367
    Joe Fallon
    Mar 6, 2004
  3. =?Utf-8?B?bWl6ZA==?=
    Replies:
    0
    Views:
    445
    =?Utf-8?B?bWl6ZA==?=
    Apr 16, 2004
  4. =?Utf-8?B?SXVsaWFuIElvbmVzY3U=?=

    Switching to the secure page looses authentication...

    =?Utf-8?B?SXVsaWFuIElvbmVzY3U=?=, May 24, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    325
    Calvin Luttrell/ProjectThunder.com
    May 24, 2004
  5. ArifulHossain tuhin

    struct looses initialization when passing to a function

    ArifulHossain tuhin, Mar 2, 2012, in forum: C Programming
    Replies:
    7
    Views:
    289
    Keith Thompson
    Mar 3, 2012
Loading...

Share This Page