From: Mark Hammond on
On 17/03/2010 1:26 AM, Barak, Ron wrote:
> Thanks for the suggestion Pable.
> However, I really need the $PYTHONPATH to include this additional
> library, so all Python scripts could use it.
> In Windows I have defined PYTHONPATH as
> c:\views\cc_view\TS_svm_ts_tool\SVMInspector\lib\, and also in the
> Windows registry I have
> HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\/version/\PythonPath\ as
> C:\Python26\Lib;C:\Python26\DLLs;C:\views\cc_view\TS_svm_ts_tool\SVMInspector\lib\;C:\Python26\Lib\lib-tk;
> However, even with all the above, the SVMInspecor modules are not found.

You need to create your own sub-key, with any name, under the PythonPath
key and add your path there. The reason is that Python only looks for
that root key when it can't sniff the location of the library itself
based on the location of the executable - and in most cases it can.
Python does however enumerate and use the sub-keys in all cases.

HTH,

Mark
From: Barak, Ron on


> -----Original Message-----
> From: Mark Hammond [mailto:skippy.hammond(a)gmail.com]
> Sent: Wednesday, March 17, 2010 2:08 AM
> To: Barak, Ron
> Cc: Pablo Recio Quijano; python-list(a)python.org
> Subject: Re: How to add a library path to pythonpath ?
>
> On 17/03/2010 1:26 AM, Barak, Ron wrote:
> > Thanks for the suggestion Pable.
> > However, I really need the $PYTHONPATH to include this additional
> > library, so all Python scripts could use it.
> > In Windows I have defined PYTHONPATH as
> > c:\views\cc_view\TS_svm_ts_tool\SVMInspector\lib\, and also in the
> > Windows registry I have
> >
> HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\/version/\Python
> Path\ as
> >
> C:\Python26\Lib;C:\Python26\DLLs;C:\views\cc_view\TS_svm_ts_tool\SVMIn
> > spector\lib\;C:\Python26\Lib\lib-tk;
> > However, even with all the above, the SVMInspecor modules
> are not found.
>
> You need to create your own sub-key, with any name, under the
> PythonPath key and add your path there. The reason is that
> Python only looks for that root key when it can't sniff the
> location of the library itself based on the location of the
> executable - and in most cases it can.
> Python does however enumerate and use the sub-keys in all cases.
>
> HTH,
>
> Mark
>

Hi Mark,
Could you give an example ilustrating your suggestion ?
Thanks,
Ron.