[Stackless] 'Normal' sys.path being used instead of Stacklessone
kylotan at gmail.com
Mon Jan 19 16:58:03 CET 2009
2009/1/19 David Wyand <TheHeadGnome at gnometech.com>:
>> 2009/1/19 Ben Sizer <kylotan at gmail.com>:
>> 3) I'd appreciate any solution that allows me to (a) use Stackless as
>> part of an embedded app and (b) doesn't require that I recompile
>> binary 3rd party libraries downloaded from easy_install etc.
> For my game I'm embedding Stackless with a C++ game engine (Torque). I
> cannot guarantee that the user will have the same version of Python that I'm
> developing against, or that they even have Python installed at all. So I
> include the appropriate libraries as part of my game's install.
> I found that calling Py_SetPythonHome() with the correct pathway to my own
> libraries just prior to Py_Initialize() worked out well. I've also done a
> PySys_SetPath() following the initialize to do some further custom setup,
> but you may not need to. Currently I've tested this under WinXP.
Thanks David, merely knowing about those 2 functions should get me
well on my way to having something working.
> As for (b), you may or may not need to recompile a 3rd party library. You'll
> likely just need to test it out and see if it works -- or look under the
> hood for possible conflicts. Of course, pure Python libs should be fine.
If I can use the above functions to run my embedded Stackless app in
its own sandbox then this becomes less of a problem. I was mostly
worried about the implication that everyone who uses Stackless uses it
as their main Python installation, which is a problem if it now means
I have to rebuild every 3rd party library I use for the myriad of
applications I have which don't need the Stackless functionality but
do require lots of pre-compiled libraries.
More information about the Stackless