[rp] [newbie] embedding python

Gustavo Niemeyer niemeyer at conectiva.com
Sun Mar 24 03:44:49 EST 2002


> i have a python script "file.py" which has a function in it which i
> need to call from my c code. how can i do this! all my projects have
> been postponded becuase i cant do this! please helP! i would be so
> grateful!!

Hummm.. I'm not sure... how grateful? ;-))

> ultimately im trying to embed some python into my c source in UNIX.
> i have absoutely no idea how to do this despite the tutorial on the web at
> http://www.python.org/doc/current/ext/building-on-unix.html#building-on-unix

I don't think this page will be helpful. You should probably be looking
at http://www.python.org/doc/current/ext/embedding.html

> it's too general and not step by step enough for a noob like me :(

The best way to learn is to look at existent code, and use in your
benefit the fact that you have the python source in your hands.

Looking at google for "embedding python" will be helpful as well. Here
is an URL I got in the first page:

http://www.mcmillan-inc.com/embed.html

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]




More information about the Python-list mailing list