469,928 Members | 1,862 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,928 developers. It's quick & easy.

Embedding Python in my C++ application

I am working on embedding Python 2.5 in my C++ application, and I have a
few questions:

1) My application is multi-threaded; what problems should I be aware of
if I create a separate interpreter in each working thread? The
documentation is a bit vague (or perhaps I haven't found the right
place). Calls into my application are already thread-safe.

2) Rather than implementing my own editor in C++, I would like to be
able to use existing tools to some degree, such as a python editor,
interactive interpreter and perhaps even debugger, without impacting the
main (GUI) thread of my application. Is there an example application, or
any hints from someone who has done this?

3) Because my program links statically with the C runtime (on Windows),
and Python links with it dynamically, there are some things that cannot
be passed back and forth, such as C file handles and FILE pointers. Is
anyone aware of other issues this may cause?

I will greatly appreciate help with these questions, or advice on
embedding Python in general!

Thanks,
Sev
Jun 27 '08 #1
0 1032

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Alicia Haumann | last post: by
1 post views Thread by Martin | last post: by
2 posts views Thread by Roose | last post: by
1 post views Thread by amit | last post: by
1 post views Thread by Tommy Nordgren | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.