Embedding Python in my C++ application

Discussion in 'Python' started by Severian, Apr 16, 2008.

  1. Severian

    Severian Guest

    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
     
    Severian, Apr 16, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mustafa Demirhan
    Replies:
    0
    Views:
    305
    Mustafa Demirhan
    Nov 9, 2004
  2. Mustafa Demirhan
    Replies:
    0
    Views:
    282
    Mustafa Demirhan
    Nov 9, 2004
  3. Mustafa Demirhan
    Replies:
    0
    Views:
    609
    Mustafa Demirhan
    Nov 9, 2004
  4. Kakacek
    Replies:
    1
    Views:
    384
    Kakacek
    Jan 12, 2006
  5. Zorigaman
    Replies:
    1
    Views:
    1,043
    Zorigaman
    Aug 17, 2009
Loading...

Share This Page