From: robin at jessikat.demon.co.uk (Robin Becker)
Date: Tue, 13 Apr 1999 13:32:44 +0100
Subject: site.py & COM startup
Message-ID: <U+ok8DAslzE3EwUd@jessikat.demon.co.uk>
X-UID: 1640                                                  

using Mark Hammond's win32com for a server I find that the installation path is not
automatically in sys.path so my base .pth files are missed and I get troubles.

I hacked site.py to fix this using the fact that sys.prefix == '' when running a com
server (I guess inproc).

the code I used inside site.py at line 93 looks like

if sys.prefix == '':
   from imp import find_module
   prefixes = [os.path.normpath(os.path.dirname(find_module('site')[1])+'/..')]
else:
   prefixes = [sys.prefix]

but I guess this isn't really how it should be done. Any suggestions?
-- 
Robin Becker




