[python-win32] Services, non-registered Python and import path problem

Guido Wesdorp mailings at johnnydebris.net
Tue Jul 22 19:28:20 EDT 2003


Hello there!

For one  of our products (an XMLRPC server that converts XML files of a 
specific format to Word documents using COM) I'm building an installer 
(Windows only, obviously :) and now I have a problem I don't know how to 
solve. My setup is somewhat complicated: the installer places a full 
Python distribution (together with Twisted and PyXML) somewhere on disk 
and does NOT register itself in the registry. That way I hope to be able 
to avoid clashes with other Python versions installed (especially the 
modules in the Python Lib dir should be sandboxed: PyXML overwrites some 
core modules and I don't want to interfere with what the user already 
has installed, also I don't want to overwrite possibly newer installs of 
PyXML or Twisted), which seems to work just fine so far.
However, when I register the app as an NT service, there are two weird 
things I run into: the Python version called seems to be another one 
than the one I installed (although I use the installed one to register 
the service with: obviously that is not enough and Windows dives back to 
the one that is registered in the Registry, don't know what happens if 
no Python is installed at all) and also, no matter what I do (yes, I've 
played around with setting sys.path correctly) some modules can not be 
found.
Do any of those problems sound familiar? If so, is there a way to work 
around/solve them? Help would be greatly appreciated...
Cheers,

Guido Wesdorp, Infrae (Holland)




More information about the Python-win32 mailing list