473,782 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SWIG callback problem on win32

Hi,

I tried to build the swig: callback example,
but when I run the runme.py file I get a message box:
abnormal program termination

The error appears in already in the first line of the python
callback generation:

# Add a Python callback (caller owns the callback, so we
# disown it first by calling __disown__).

caller.setCallb ack(PyCallback( ).__disown__())
caller.call()
caller.delCallb ack()

When I call only PyCallback().__ disown__()
alone, the error appears, too.

Anybody knows a solution?

Thanks a lot,

Markus
Jul 18 '05 #1
1 2704
Markus von Ehr schrieb:
Hi,

I tried to build the swig: callback example,
but when I run the runme.py file I get a message box:
abnormal program termination

The error appears in already in the first line of the python
callback generation:

# Add a Python callback (caller owns the callback, so we
# disown it first by calling __disown__).

caller.setCallb ack(PyCallback( ).__disown__())
caller.call()
caller.delCallb ack()

When I call only PyCallback().__ disown__()
alone, the error appears, too.

Anybody knows a solution?

Thanks a lot,

Markus

I made a new trial:

The error appears in the following line of the
Callback class:
_camera_callbac k.disown_Callba ck(self)

I guess the problem is in the
static PyObject *_wrap_disown_C allback
function?
How could I get rid of it?

Thanks for any hints to get rid of this error.

Markus

PS
The application is a C++ Thread providing a callback function,
when a new camera image on the firewire bus is available.
Then I want to inform a python object that it can fetch the new
image data.

Jul 18 '05 #2

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

Similar topics

0
2092
by: Phil Schmidt | last post by:
I'm attempting to follow the instructions at http://sebsauvage.net/python/mingw.html, without luck. I have Python 2.3, MinGW 3.2.3, ans SWIG 1.3.19. I get an export error on "initexample" when attempting the example. Do I need some extra switches to get SWIG to create that function? Or is it something else? Here's my example build:
0
2016
by: Jon Moldover | last post by:
Hi, I'm using Python in my win32 app by linking to the python23.dll. I'm trying to expose some c++ code in my app to Python so I can make application calls from Python scripts (according to the Python windows FAQ I shouldn't have to make a seperate dll, see link below). I create a MyModule.i file for swig which contains a simple test c++ class. I run swig on it with the following options: swig -python -c++ -includeall -shadow MyModule.i,...
0
1731
by: Jeff | last post by:
I'm trying to pass a proxy class instance (SWIG generated) of CClass, to a python callback function from C++. The proxy class instance of CClass is created from a pointer to the C++ class CClass. Using the code below, I receive the error message: "AttributeError: 'PySwigObject' object has no attribute 'GetName'" The python callback function is being passed in through the clientdata
0
2727
by: Bill Davy | last post by:
I am working with MSVC6 on Windows XP. I have created an MSVC project called SHIP I have a file SHIP.i with "%module SHIP" as the first line (file is below). I run SHIP.i through SWIG 1.3.24 to obtain SHIP_wrap.cpp and SHIP.py; the latter contains the line "import _SHIP". I compile SHIP_wrap.cpp and a bunch of files into a DLL which I have the
0
1291
by: peter.o.mueller | last post by:
Hi together, i have a Windows DLL in C that is internally multithreaded and provides a callback function to signal specific events. As I understood one can use "normal" C-code with swig. Is it also possible to use existing DLLs? Does swig can also handel the callback method? If not - is there another wrapper toolkit that can do that? Thanks, Peter
0
2407
by: ReaprZero | last post by:
Hi, I'm using Cygwin and ActiveState perl to try to compile a sample application using SWIG. I'm using the short tutorial from http://www.swig.org/tutorial.html (the perl part of it), but with a simplified version of their example (just a void hello() {printf("Hello, world!\n");} and corresponding .i interface file, %module hello \ extern void hello();). I first do swig -perl5 hello.i which works fine.
2
4453
by: ajikoe | last post by:
Hi, I tried to follow the example in swig homepage. I found error which I don't understand. I use bcc32, I already include directory where my python.h exist in bcc32.cfg. /* File : example.c */ #include <time.h>
1
3149
by: myheartinamerica | last post by:
Hello, I spent the morning figuring out how to use SWIG on Microsoft Windows. I compiled the example from the SWIG tutorial on http://www.swig.org. The biggest stumbling block was not knowing that I needed to rename the DLL created to have a PYD extension. I also ended up writing a .def file for exporting functions from the DLL. Here is my SConstruct file for using SCons to build the library. It is not perfect, but it should be...
0
1603
by: newbie73 | last post by:
Going through the tutorial on http://swig.org, I created the example files (pasted below). After generating the _wrap file, I tried compiling (using mingw32) and received a lot of undefined reference compiler errors: ...\build\temp.win32-2.5\Release\example_wrap.o:example_wrap.c:(.text+0x670f): undefined reference to `_imp__PyExc_MemoryError' there are many other similar errors all prefaced with _imp__Py, so I am assuming there is a...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10080
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9944
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7494
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6735
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5378
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2875
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.