Python Path registry Key

Sathish S sathish at solitontech.com
Sat Feb 19 07:59:54 CET 2011


Hi,

Thanks for replying. Yes sys.prefix works in the python shell window. But I
have to find out python's path from another application running on windows.
How can I access sys.prefix from that application.

Thanks,
Sathish


On Sat, Feb 19, 2011 at 12:50 AM, Westley Martínez <anikom15 at gmail.com>wrote:

> On Fri, 2011-02-18 at 11:56 +0530, Sathish S wrote:
> > Hi Ppl,
> >
> >
> > I'm trying to launch IDLE from another application. For this I need
> > the python directory path. I have been trying to get the Active Python
> > versions path from the Windows registry. However, these registry
> > entries seem not be consistent across various stations, that i
> > checked. I'm reading the following resitry key to get the active
> > versions path: Software\\Microsoft\\Windows\\CurrentVersion\\App Paths
> > \\Python.exe. There are two entries in this key. Some stations have
> > only one entry. Some do not have both. Probably they were removed
> > while python was uninstall ed and was not added again when it was
> > installed again.
> >
> >
> > So what will be a good solution to get the Python path ?
> >
> >
> >
> > Thanks,
> > Sathish
> >
> Try sys.prefix
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110219/3084e98e/attachment.html>


More information about the Python-list mailing list