[Stackless] 'Normal' sys.path being used instead of Stacklessone
David Wyand
TheHeadGnome at gnometech.com
Mon Jan 19 16:46:45 CET 2009
> 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.
As Richard pointed out, this is really a Python issue. I'd have to do the
same steps if I wasn't using Stackless. Hopefully that will cover you
question (a) above.
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.
In my case I'm making use of Twisted (to do some telnet and REST functions).
And just to be sure, I recompile Twisted against Stackless before including
it with my game's installation. I haven't done any testing to check if this
is required, but it is easy enough to do to make sure something doesn't bite
me down the road.
If you can do the same with some common 3rd party libs that are used with
your product, that will help out your end users. If not, you'll likely have
to deal with them on a case-by-case basis in your support channel. I
believe that is your only option when working with Stackless.
David Wyand
www.gnometech.com
More information about the Stackless
mailing list