FAQ
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110218/2bac3c84/attachment.html>

Search Discussions

  • Westley Martínez at Feb 18, 2011 at 7:20 pm

    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
  • Sathish S at Feb 19, 2011 at 6:59 am
    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 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>

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedFeb 18, '11 at 6:26a
activeFeb 19, '11 at 6:59a
posts3
users2
websitepython.org

2 users in discussion

Sathish S: 2 posts Westley Martínez: 1 post

People

Translate

site design / logo © 2022 Grokbase