473,473 Members | 2,031 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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.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.
Jul 18 '05 #1
1 2528
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
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Simon Erikson | last post by:
Hello: I would like to build an app consisting of a "root" frame that can contain an arbitrary number of child frames (the user will click to create them). Each of these child frames needs the...
33
by: Steven Bethard | last post by:
I feel like this has probably been answered before, but I couldn't find something quite like it in the archives. Feel free to point me somewhere if you know where this has already been answered. ...
3
by: Piet | last post by:
Hi, I am trying to generate an "hierarchical" layout based on wx.NoteBooks. That means, every page of a Notebook should be a NoteBookon its own. Here is a (short but complicated) piece of code...
12
by: Simon John | last post by:
I'm writing my 2nd large wxPython program, and after the problems I found doing the first's layout in code, I'd like to look at using a 'WYSIWYG' IDE, like VisualStudio does for MFC. I've tried...
3
by: Jerry | last post by:
I have created an application using wxPython and compiled it using py2exe. When I put setup(console=) in my setup.py file, the resulting application runs just fine. But when I change it to...
1
by: codemania | last post by:
Disappointing me extremely, with the "generate python" function within Resource Editor, I only get a segment of python code which load xrc(xml format) file, rather than real python code in which I...
3
by: mistersulu | last post by:
Hi all: I'm using a wx.ListView object with a multi-threaded wxPython app. The list is dynamically generated and accessed across two or more threads. In spite of the fact that I have checks to...
0
by: dazzler | last post by:
How do I add "background text" into MDI parent frame, the text will be now erased if I move the MDI Parent frame, or I can also erase text with moving MDI Child frame, need to somehow refresh the...
4
YarrOfDoom
by: YarrOfDoom | last post by:
I just installed wxPython on my computer (Windows "fails-a-lot" Vista, 32bit, Python 2.6, PIL and pyOpenGL installed). However, when I try to import the wxPython module, I get this: >>> import...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.