[capi-sig] Couple of Questions About Statically Linking the Interpreter

Stefan Behnel python_capi at behnel.de
Tue Oct 20 10:09:28 CEST 2009


Nathan Osman wrote:
> Im kind of new to the Python/C api and I had a couple q's about the interpreter.
> 
> 1. If i statically link the libpython31.a library to my app are there
> any other files i need to include for the end users?

You will most likely need the standard library as well. The freeze script
in Python/Tools/ (source distro) might help here.

There's also py2exe, but that creates a stand-alone application, not a
linkable binary (AFAIK).


> 2. How do you get the interpreter output from the console when you are
> running within a gui environment? Can it be redirected?

sys.stdout = ...

Stefan



More information about the capi-sig mailing list