Set Pythonpath on NT/95/98 without Win32 extensions

Richard GRUET rgruet at ina.fr
Fri May 14 09:07:54 EDT 1999


Mike,

I assume your package install dir is INSTALL and you have Python release
1.5.2;

- To me, the best way to add this dir to the Python path is to create a key
under KEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5\PythonPath, named
arbitrarily (eg. MyPackage) with the INSTALL path as the key default value
(it's easy to uninstall).

- Your problem is that the Win32 extensions are not included in your
distribution. But there is a solution.
  With the standard regedit.exe program (under windows or winnt directory),
you can export a subtree (part) of the registry as a .reg file [See regedit's
registry menu] This is a text file looking like :


     REGEDIT4

     [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5\PythonPath\Fnorb]

     @="D:\\FNORB;D:\\FNORB\\Fnorb\\src\\Release"

(this example is for the key dedicated to the Fnorb package)

You may edit this file to fit your needs.

Conversely, you may (re)create keys by importing the file with the command:

    regedit.exe ".......\MyPackage.reg"   (assuming your export file is
MyPackage.reg)

or by just double-clicking the reg file.

Alternatively, you may create your .reg file from scratch or on the fly, then
import it.
Remember! U must have administrative rights to modify the registry.

Hope this helps

Richard

Mike Fletcher wrote :

> I have now prepared a four or five module package, and am all ready to
> distribute it, but, for the life of me, I can't see how to set the python
> path (stored in the registry) without the Win32 extensions.
>
> I suppose I could suggest that people drop the package directly into their
> lib directory, but that seems, well, wrong.  I could tell them how to edit
> their registry, but first, they are not necessarily technical, and second,
> that is ugly as hell as an installation solution.
>
> Ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/19990514/7f702127/attachment.html>


More information about the Python-list mailing list