Graham Dumpleton wrote: >> 2) How to isolate the embedded interpreter from environmental effects. I >> have found that on occasion, the interpreter would pick up "stray" >> installations which can cause weird problems. Which environmental >> settings affect the startup of an embedded Python interpreter? > > PYTHONHOME environment variable, or if embedded in C application use > Py_SetPythonHome() before calling Py_Intialize(). This can be used to > ensure that specific Python installation is used as source of > configuration and modules.
Aha! I have never seen this call mentioned in any of the embedding docs. >> How does >> one work around/remove those dependencies? Is there any information >> available about how exactly the startup works? > > Yes, the source code. :-) Heh, heh. >> What is being read/loaded >> in which order etc? > > Set PYTHONVERBOSE environment variable to have Python output a lot of > information about what it is doing at startup. Thanks I'll do that. Cheers, - Andreas -- http://mail.python.org/mailman/listinfo/python-list