[Import-sig] RE: pythonpath and COM support

Mark Hammond mhammond@skippinet.com.au
Sat, 5 Feb 2000 10:44:38 +1100

> [also posting this to the import-SIG]

Sheesh - too many new sigs.  Im not on that one, so please CC me where

> Couldn't pythoncom15.dll etc. live in /DLLs? Or are they
> loaded by other C extensions (using LoadLibrary instead of
> PyImport_x)?

pythoncom15.dll and pywintypes15.dll (infact, anything I release with the
extension ".dll") is used as a "standard DLL".  There exists the possibility
that a .exe will have an implicit reference to one of these .DLLs.  So
unless they are in the same path as the executables, or on the %PATH%, they
will not be found.

> > * The path searching code would need to use the location of
> Python1x.dll,
> > rather than the .exe, to locate the PYTHONHOME.  This would not
> be a huge
> > change, but necessary none-the-less.
> Um, why? Especially if they're the same directory ;-)?
> Oh, because of COM (and exposing python15.dll as a COM
> server)?

Exactly - when a Python COM object is being used, the .exe may well be
something created by VB, and no where near the Python directory.  Thus, the
full path to the .exe will be useless, but the full path to Python1x.dll
will be OK.

> At the very least, would get around the must-have-admin-rights
> on NT problem.

The admin problem is due to writing the registry, rather than copying
something to the system32 directory.  At the moment, the installation
package writes 2 classes of information:

* Core Python stuff - pythonpath etc.
* Information for other installers and IDEs

The 2nd category includes stuff like the "Start Menu" group the user
selected, and the path where Python was installed.  Later installers (such
as win32all) can read this information and avoid asking the user the same
questions - thereby making the installation process more robust.  Another
example is "help files" - eg, a list of all documentation installed by
Python or extensions, thereby allowing IDEs to be smart.

If we can drop the registry all together for the first category, then it
would seem a shame to keep using the registry just for the 2nd category.
OTOH, I think the information made available by the 2nd category is