Extending and embedding Python

Discussion in 'Python' started by Tommy Nordgren, Jul 11, 2005.

  1. I want to write an application that embeds and extends (at least) the
    Python and Perl interpreters. Now i want to find as much as possible
    about the Python tools used for extending and embedding Python.
    To be more specific: My app should:
    1. Parse an input file.
    2. Call a script in some scripting language, to generate an output file,
    for example in C++.

    For task 2 I need to call an embedded interpreter, and also provide call
    backs from the scripting language to C++, in order to read global
    information collected during parsing.

    In order to correctly compile and link my Application, I need a OS
    independent way to find compiler options and linker options necessary to
    find header files and libraries. What methods should I use from
    DistUtils for this purpose.


    I also need to find some way to verify that linker options necessary for
    embedding Perl is not incompatible with linking options for embedding
    Python.

    Stockholm July 11, 2005
    Tommy Nordgren
     
    Tommy Nordgren, Jul 11, 2005
    #1
    1. Advertising

  2. Tommy Nordgren wrote:
    > In order to correctly compile and link my Application, I need a OS
    > independent way to find compiler options and linker options necessary to
    > find header files and libraries. What methods should I use from
    > DistUtils for this purpose.


    I don't think distutils supports linking applications that embed
    Python, yet. It might be possible to write a distutils command for
    that purpose, but I'd advise against that.

    Instead, you should integrate the Python embedding into the build
    process you alread have (e.g. make, shell scripts, whatever). You
    can simplify the process by having a Python script compute all
    the necessary parameters. You find the configuration-specific
    information in distutils.sysconfig.

    HTH,
    Martin
     
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=, Jul 11, 2005
    #2
    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. Luke
    Replies:
    3
    Views:
    525
    Robin Becker
    Oct 24, 2003
  2. Faheem Mitha
    Replies:
    0
    Views:
    427
    Faheem Mitha
    Jun 28, 2004
  3. stefan
    Replies:
    3
    Views:
    442
    stefan
    Dec 8, 2004
  4. Benjamin Rutt
    Replies:
    0
    Views:
    366
    Benjamin Rutt
    Sep 26, 2005
  5. Tim Spens
    Replies:
    1
    Views:
    1,087
    Matimus
    Jun 27, 2008
Loading...

Share This Page