#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Location
    Iceland
    Posts
    35
    Rep Power
    14

    python interpreter as dll


    I was wondering if there was a way to compile the python interpreter as a dll. What i'm thinking about is that I really want to use python in my C++ apps for handling all sorts of minor task in them such as macros, game logic etc, but I don't want to have a "You must download the python interpreter to use this app" dependencie. I just want to have the python interpreter as a dll in my apps' dir. Can this be done? If so, how?

    Regards,

    Andri Mar Jónsson
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    Houston, TX
    Posts
    383
    Rep Power
    14
    Read this, it explains how to embed Python in stuff:

    http://docs.python.org/ext/ext.html
    Last edited by Strike; October 4th, 2004 at 10:57 AM. Reason: linkification
    Debian - because life's too short for worrying.
    Best. (Python.) IRC bot. ever.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    The python interpreter is already in a dll - search for python23.dll in your Windows/system32 directory. (Assuming you have Python 2.3 installed).

    The python.exe program is a thin wrapper round the dll to make it executable. The link that Strike posted will show you how to embed python in other programs.

    Dave - The Developers' Coach.

IMN logo majestic logo threadwatch logo seochat tools logo