How to use list type generated by SWIG?

B

Bryan

I am writing a small script to manage my ipod. I am using the python
bindings for libgpod. I have never used swig, or used python to
program against a c/c++ library.

I can get the library to find my ipod, and parse its DB format, but
I'm not sure how to interact with the types that some of the functions
return, specifically a Swig Glist (gtk's doubly-linked list)

import gpod
db = gpod.itdb_parse('/media/ipod', None)
print db.tracks
Glist is not iterable or subscriptable. It contains a 'next' function
which always seems to return None after printing "swig/python detected
a memory leak of type 'GList *', no destructor found." to the console.

How can I interact with this list?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top