472,143 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,143 software developers and data experts.

Extending and embedding Python

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
Jul 21 '05 #1
1 1693
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
Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mark Harrison | last post: by
4 posts views Thread by Alicia Haumann | last post: by
1 post views Thread by Richard Townsend | last post: by
3 posts views Thread by Marco Meoni | last post: by
1 post views Thread by jeremito | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.