Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Embedding Python in my C++ application

Reply
Thread Tools

Embedding Python in my C++ application

 
 
Severian
Guest
Posts: n/a
 
      04-16-2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedding a python console inside a python application Zorigaman Python 1 08-17-2009 10:26 PM
Embedding Python: Creating Python Class from Application Kakacek Python 1 01-12-2006 04:32 PM
Re: Embedding Python in a multi-threaded C++ application Mustafa Demirhan Python 0 11-09-2004 10:08 PM
Embedding Python in a multi-threaded C++ application Mustafa Demirhan Python 0 11-09-2004 07:06 PM
Embedding Python in a multi-threaded C++ application Mustafa Demirhan Python 0 11-09-2004 06:49 PM



Advertisments