Weird vc++ runtime error

Hi list!
I'm currently trying to port an wxWidgtets application from C++ (compiler VC++) to Python.
Two problems arise:
when I edit the python source with IDLE, clicking on the python shell (or IDLE) results in an
VC++ runtime error, while the apllication is in the main loop.
Secondly I think that I have general problems with IDLE.
Changes to source codes of modules seem have no effect, also when the source file is saved.
Only closing and reoopening it with IDLE leads to the desired effect.
I'm working with Python 2.4 and the latest wxWidgest release (2.6).
Please see the attached source code.
The main app is scanner, the module is messung.

Thanks in advance!
Florian

messung.py (4.94 KB)

scanner.py (2.89 KB)

Seg, 2005-06-20 às 14:49 +0200, Florian Hengstberger escreveu:

Hi list!
I'm currently trying to port an wxWidgtets application from C++
(compiler VC++) to Python.
Two problems arise:
when I edit the python source with IDLE, clicking on the python shell
(or IDLE) results in an
VC++ runtime error, while the apllication is in the main loop.
Secondly I think that I have general problems with IDLE.
Changes to source codes of modules seem have no effect, also when the
source file is saved.
Only closing and reoopening it with IDLE leads to the desired effect.
I'm working with Python 2.4 and the latest wxWidgest release (2.6).
Please see the attached source code.
The main app is scanner, the module is messung.

I don't know if I understand you question correctly...

Are you port the c++ app to python in the same directory?
Is the c++ messung module, a dll? If so when you try to do a import
messung from python you are import the dll, witch is not a valid dll
python, and not the messung.py

I'm just guessing...

Ricardo

No, both projects are dwell in seperated directories.
My problem is just the python code, the C++ code is ok.
(Forget about the porting, it was just a introduction, I have the same behaviour on
a laptop without any VC++ installed.)
This problem is truely a wxPython2.6, IDLE problem.
Just a guess: two eventloops (wxPython app and IDLE) can't run in parallel.
Is the way I'm importing the modules okay?
Is IDLE a good joice?

Thanks
Florian

Ricardo Pedroso wrote:

···

Seg, 2005-06-20 às 14:49 +0200, Florian Hengstberger escreveu:

Hi list!
I'm currently trying to port an wxWidgtets application from C++ (compiler VC++) to Python.
Two problems arise:
when I edit the python source with IDLE, clicking on the python shell (or IDLE) results in an
VC++ runtime error, while the apllication is in the main loop.
Secondly I think that I have general problems with IDLE.
Changes to source codes of modules seem have no effect, also when the source file is saved.
Only closing and reoopening it with IDLE leads to the desired effect.
I'm working with Python 2.4 and the latest wxWidgest release (2.6).
Please see the attached source code.
The main app is scanner, the module is messung.
   
I don't know if I understand you question correctly...

Are you port the c++ app to python in the same directory?
Is the c++ messung module, a dll? If so when you try to do a import
messung from python you are import the dll, witch is not a valid dll
python, and not the messung.py

I'm just guessing...

Ricardo

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

IDLE is not a good choice for wxPython.

1. Run from the command line
2. or choose another editor.

Note, if you choose Pythonwin, refer to step one.

Idle and Pythonwin both have their own event loops which interfere with wxPython.

-Joe

Florian Hengstberger wrote:

···

No, both projects are dwell in seperated directories.
My problem is just the python code, the C++ code is ok.
(Forget about the porting, it was just a introduction, I have the same behaviour on
a laptop without any VC++ installed.)
This problem is truely a wxPython2.6, IDLE problem.
Just a guess: two eventloops (wxPython app and IDLE) can't run in parallel.
Is the way I'm importing the modules okay?
Is IDLE a good joice?

Thanks
Florian

Ricardo Pedroso wrote:

Seg, 2005-06-20 às 14:49 +0200, Florian Hengstberger escreveu:

Hi list!
I'm currently trying to port an wxWidgtets application from C++ (compiler VC++) to Python.
Two problems arise:
when I edit the python source with IDLE, clicking on the python shell (or IDLE) results in an
VC++ runtime error, while the apllication is in the main loop.
Secondly I think that I have general problems with IDLE.
Changes to source codes of modules seem have no effect, also when the source file is saved.
Only closing and reoopening it with IDLE leads to the desired effect.
I'm working with Python 2.4 and the latest wxWidgest release (2.6).
Please see the attached source code.
The main app is scanner, the module is messung.
  
I don't know if I understand you question correctly...

Are you port the c++ app to python in the same directory?
Is the c++ messung module, a dll? If so when you try to do a import
messung from python you are import the dll, witch is not a valid dll
python, and not the messung.py

I'm just guessing...

Ricardo

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Hi,

···

Am Mon, 20 Jun 2005 15:32:38 +0200 schrieb Florian Hengstberger <hengstb@ati.ac.at>:

Just a guess: two eventloops (wxPython app and IDLE) can't run in parallel.

That's the one. the only IDE that I know of that can debug wxPython code is
WingIDE. It's not open source and the full version costs. But I found it well worth it.

Adi

Hi Florian,

Florian Hengstberger wrote:

Hi list!
I'm currently trying to port an wxWidgtets application from C++ (compiler VC++) to Python.
Two problems arise:
when I edit the python source with IDLE, clicking on the python shell (or IDLE) results in an
VC++ runtime error, while the apllication is in the main loop.
Secondly I think that I have general problems with IDLE.
Changes to source codes of modules seem have no effect, also when the source file is saved.
Only closing and reoopening it with IDLE leads to the desired effect.
I'm working with Python 2.4 and the latest wxWidgest release (2.6).
Please see the attached source code.
The main app is scanner, the module is messung.

Thanks in advance!
Florian

------------------------------------------------------------------------

from wxPython.wx import *

As you are just moving over to wxPython you should use the new wx namespace stuff, i.e. instead of the above you should do:

import wx

and then use wx.Frame, wx.Panel etc etc.

For more details check out: http://www.wxpython.org/migrationguide.php

You might also want to check out Boa Constructor as an IDE, you can debug wxPython apps with it (except on Mac there is a problem with this). Boa Constructor - wxPython GUI Builder download | SourceForge.net

See you
Werner

P.S.
Can't try your app as logger.py is missing.

Sorry, I've forgotten logger.py, but the situation is clear now.
Thanks for this hint concerning the new namespace, I wanted to ask this, but
you've answered this in advance.
Great!

Regards,
Florian

Werner F. Bruhin wrote:

···

Hi Florian,

Florian Hengstberger wrote:

Hi list!
I'm currently trying to port an wxWidgtets application from C++ (compiler VC++) to Python.
Two problems arise:
when I edit the python source with IDLE, clicking on the python shell (or IDLE) results in an
VC++ runtime error, while the apllication is in the main loop.
Secondly I think that I have general problems with IDLE.
Changes to source codes of modules seem have no effect, also when the source file is saved.
Only closing and reoopening it with IDLE leads to the desired effect.
I'm working with Python 2.4 and the latest wxWidgest release (2.6).
Please see the attached source code.
The main app is scanner, the module is messung.

Thanks in advance!
Florian

------------------------------------------------------------------------

from wxPython.wx import *

As you are just moving over to wxPython you should use the new wx namespace stuff, i.e. instead of the above you should do:

import wx

and then use wx.Frame, wx.Panel etc etc.

For more details check out: http://www.wxpython.org/migrationguide.php

You might also want to check out Boa Constructor as an IDE, you can debug wxPython apps with it (except on Mac there is a problem with this). Boa Constructor - wxPython GUI Builder download | SourceForge.net

See you
Werner

P.S.
Can't try your app as logger.py is missing.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org