[python-win32] testing multiple versions of modules

Jim Vickroy Jim.Vickroy@noaa.gov
Thu, 28 Mar 2002 08:46:46 -0700


Thanks Jens.  I will look at your module.

I'm not much of a MS Windows programmer, but on page 27 of "Python
Programming on Win32" there is the statement that good Windows applications
store their information in the Windows Registry so I thought that was the
preferred way.

Anyway, at run time, I need to be able to control the order of the entries
in sys.path so that older versions of some modules are not imported instead
of the newer versions.  Im assuming sys.path is searched from first to last
to resolve import requests.  I guess I need so directory naming convention
that readily sorts from "newest" to "oldest" directory path.


"Jens B. Jorgensen" wrote:

> It is convenient to simply set the PYTHONPATH environment variable. The
> contents of this path are tacked on to the end of the standard sys.path.
> BTW if you would like to use a registry module that has an easy to use
> and really-pythonified interface you could also try out my pyRegistry
> module (http://www.ultraemail.net/~jbj1).
>
> Jim Vickroy wrote:
>
> >I wish to conveniently test multiple versions of my Python application
> >modules on a MS Windows platform.  I want to avoid manually editing the
> >Windows registry each time I want to modify the Python search path.  Is
> >modifying the contents of sys.path the way to do this and is use of the
> >_winreg module API the best way to modify sys.path?
> >
> >Advice would be appreciated.  Thanks.
> >
> >
> >_______________________________________________
> >Python-win32 mailing list
> >Python-win32@python.org
> >http://mail.python.org/mailman/listinfo/python-win32
> >
>
> --
> Jens B. Jorgensen
> jens.jorgensen@tallan.com