Using the wxPythonSrc as a reference I created a simple extension module
successfully. I'll do a write-up for the group soon.
I have a couple of follow up questions
When I import my new module
import wx.vision
It complains about the _vc.dll not found. I added this to my path and then
it worked. What confuses me is that the wxPython modules like core and
windows seemingly do not require the DLL's on the path. Are these statically
linked or do they somehow know where to look.
Second question is more a wxWindows question. I need to paint the window
quite often. I use DrawDibDraw() to paint the image every N milliseconds.
However as far as I understand all GUI related work needs be in the same
thread. So in my stand-alone application I extended the main event loop to
paint the video window when a frame frame was available. This main event
loop also paint other windows that showed post processed video images.
However for the wxPython integration I want to avoid extending the main
loop. Can a separate thread paint on the window. Note that this window
probably will only be in control of that thread. The window object itself
has nothing else associated with it.
Thanks
Johan
···
-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Monday, April 19, 2004 7:45 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Extending wxPython/wxWindows with new C++ mo
dules
Schalkwyk, Johan wrote:
I successfully updated SWIG from sourceforge. Had a little trouble with
cygwin compilation. Beware the introduction of "^M". Cygwin needs to
properly installed in UNIX mode, and all autotools need to conform.After fixing the ^M problem and applying the wxPython patches SWIG built
and
ran successfully on the wxPythonSrc distribution. Almost got my own
extension working.Question: What is the relationship between wx and modules like core and
windows. I'm getting an error message
Since some compilers *cough*microsoft*cough* croak when there are more
than about 64K lines in a .cpp file, I have to split the stuff that
appears in the main wx namespace into multiple extension modules, and
then merge them back together into a single namespace using python
imports. The modules that make up the main wx namespace are core, gdi,
windows, controls, and misc. Each of those has an extension module
named the same but with a leading underscore: _core, _windows, etc.
ImportError no module named _core.
While loading my new wxPython extension.
It seems like it is possible to pickup wx, but not _core.pyd or
_windows.pyd.
Two possible reasons, either the .pyd files don't exist in the same
place that you are importing wx/__init__.py from, or you have built a
debug version and so it is looking for _core_d.pyd.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org