[Pythonmac-SIG] Embedding problems on the Macintosh

Jack Jansen jack@oratrix.nl
Tue, 24 Aug 1999 11:14:26 +0200


> 
> Hi I'm having some problems using the Py_CompileString function.  Previously
> in my application I was using Compiled PYC resources for embedding Python
> modules in my application.   However I need to now use plain text files, and
> I was looking for a way to do this.
> 
> Since I couldn't find an example of this, I went header diving in the Python
> source.  I had all ready figure out how to get this to work with already
> compiled 'PYC ' resources, and I tried using the Py_CompileString.
> 
> The problem is that every time I call "Py_CompileString" it causes my
> application to quit.

The only thing I can think of is that the C++ stuff (GUSI) isn't initialized 
correctly.

Make sure that __initialize is set as initialization entry point (in the 
linker preference section in CodeWarrior) so the C++ runtime gets a chance to 
initalize. See the PythonStandalone or PythonStandSmall projects for examples.
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm