468,133 Members | 1,177 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,133 developers. It's quick & easy.

Questions on embedding Python

We're looking at embedding Python into our product to provide users
with the ability to write scripts for the programming. My knowledge
of Python is excellent, I'm familiar with the concepts of converting
back and forth between C and Python datatypes, but my knowledge of
compiling and linking is almost nonexistent. So if I could get advice
on the following, it would be most appreciated. The program currently
runs on Mac and Windows.

1) When Python is embedded, is it typically compiled statically into
the program, or provided as a dynamic library?

2) If provided as a dynamic library, does/should Python be recompiled
into a tweaked dynamic library, or do we just use the python
executable 'straight up', so to speak.

3) We would of course want to make sure that 'our' Python (so to
speak) would have access only to 'our' library of Python code (which
would include most of the standard Python libraries), so that it
can't be confused by the presence of some other version of Python on
the system. Is this normally done by compiling in the Python search
path, making it relative to the main application?

4) I've never done this myself, but I understand that Python can
import code from zip files in much the same way that Java can import
from jar files. Is it possible to lump all of the python code we
provide for use with the embedded Python into one big zip file, or
would that cause problems such as slow loading when a module is
imported? This would be nice because the fewer files we distribute,
the better.

Many thanks,
Ken
Nov 22 '05 #1
0 941

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

23 posts views Thread by Robey Holderith | last post: by
2 posts views Thread by Roose | last post: by
reply views Thread by adsheehan | last post: by
1 post views Thread by amit | last post: by
3 posts views Thread by Redefined Horizons | last post: by
27 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.