473,378 Members | 1,422 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

SWIG generated... TypeError

Hi,

I'm using a library in python which was generated by SWIG. Basically,
there is a struct in the C code, but I'm not sure what it is
equivalent to in the python code. I want to pass a pointer to some
data as an argument to a function like so:

comedi_data_read(it,subdev,chan,range,aref,data)

but get this error

Traceback (most recent call last):
File "test_comedi2.py", line 14, in ?
comedi_data_read(it,subdev,chan,range,aref, data)
TypeError: Type error. Expected _p_lsampl_t

So I'm wondering if anyone knows where stucts go in SWIG and how to
alloc one in python?

Thanks!
julia
Jul 18 '05 #1
0 875

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

Similar topics

0
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...
0
by: Chris | last post by:
Hi I have a C function that builds a list of null terminated strings: void buildStringList(char **asStrings, int n); The number of elements in the list is given in input. I'd like to have...
1
by: Java and Swing | last post by:
I am trying to wrap some C code I have. Currently I have something like... defs.h ----------- typedef unsigned long MY_DIGIT; myapp.c ------------- void MakeDigits(MY_DIGIT digits) {
2
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...
10
by: Bart Ogryczak | last post by:
Hi, I´m looking for some benchmarks comparing SWIG generated modules with modules made directly with C/Python API. Just how much overhead does SWIG give? Doing profile of my code I see, that it...
0
by: txtoth | last post by:
I'm trying to map a security_context_t ** to a python list. After calling the method that returns this type when I process the returned list in a for loop I get: TypeError: expected string or...
1
by: Martin Drautzburg | last post by:
I am trying to cPickle/unpickle a C++ extension class with some private data members. I wrote __getstate__() and __setstate__ in C++ (I have to, due to the private data). Pickling writes the...
1
by: Sells, Fred | last post by:
I'm using python 2.4 under linux (centos 5.1). I need to pass an array of doubles to a c function but am getting an error, shown near the bottom of this post....
1
by: Uberman | last post by:
I have a bit of a odd arrangement here with SWIG, Python, Embedded Python and C++ classes exported into Python. Here's the plot: I have a class defined in a C++ DLL library. I am wrapping this...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.