[Distutils] Prerelease: bdist_wininst

Mark Hammond mhammond@skippinet.com.au
Fri, 16 Jun 2000 15:14:14 -0700

> (I know python1?.exe find its directory for itself, but what
> happens if you load only the DLL?

sys.dllhandle is the HMODULE to the current Python DLL.  But on Windows,
this is in the system directory, so isnt much use.

> I think then you need the function
> void Py_SetProgramName (char *name)
> to help python with this.)

How generic do you want this to be?  Eg, if Python.exe is not the host,
then it may be something _completely_ unrelated to Python (eg, MSOffice).
So even if you know the directory of the executable, I dont really see how
that helps you.

Id be inclined to use the same technique as Python itself to locate its
home - look for a "landmark" module - os.py is used in Python 1.6 - then
one directory up should/could/may be the Python home.