You are not logged in.

#1 2005-06-27 12:17:00

Cam
Member
From: Brisbane, Aus
Registered: 2004-12-21
Posts: 658
Website

creating python wrapper for C library

Hey all,

I've been playing with Python in part of my spare time and some of this cool stuff the new Enlightenment libraries can do in another part of my spare time, however Python doesn't seem to be as blessed in the E17 area as Ruby is sad Rather than learn a new language, how can I create Python wrappers around libs written in I assume C?

If anyone has links to a tutorial/program to do this/any sort of resource at all I'd very much appreciate it, there's just only so much I can do with Evas, I'd like to play with some of the other neat stuff too if I can make it so I can use Python to do it.

Any tips - gladly accepted big_smile

Offline

#2 2005-06-27 12:29:23

juergen
Developer
From: Frankfurt/Germany
Registered: 2005-04-11
Posts: 48
Website

Re: creating python wrapper for C library

I used swig:
http://swig.sourceforge.net/

It's in extra.

Offline

#3 2005-06-27 13:14:36

Cam
Member
From: Brisbane, Aus
Registered: 2004-12-21
Posts: 658
Website

Re: creating python wrapper for C library

Thanks, I'll have a look smile

Offline

#4 2005-06-27 21:54:46

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: creating python wrapper for C library

this is not really a noob thing to do cam,
i'm not an expert on this but i can think of two ways to do it, if you know c,

1. Download pythons manual and read the chapters about the c-api,

2. use pyrex


arch + gentoo + initng + python = enlisy

Offline

Board footer

Powered by FluxBB