[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Python system paths for CEDET

From: Fabian Ezequiel Gallina
Subject: Re: Getting Python system paths for CEDET
Date: Sat, 13 Oct 2012 16:41:51 -0300

2012/10/13 David Engster <address@hidden>:
> Andreas Röhler writes:
>> Am 13.10.2012 14:26, schrieb David Engster:
>>> Andreas Schwab writes:
>>>> David Engster <address@hidden> writes:
>>>>> So here's my question: What is The Right Way to send and parse the
>>>>> command above?
>>>> How about shell-command-to-string?
>>> That's what I thought, too. But people told me that it is better to go
>>> through the python-mode layer, so that its configuration settings can be
>>> reused (the Python version to use, for example).
>> (getenv "PYTHONPATH") should be all you need here.
> Returns nil here, hence I don't get it. How does that help for seeing if
> the user wants to use, say, "python2.7" or "python3.2"? If he already
> configured that in the python mode he uses, he shouldn't have to do that
> again for CEDET.
> -David

(python-shell-internal-send-string "import sys;print ('\x00'.join(sys.path))")

That will work on python 2 and 3 and will take into account virtualenv
settings the user may have set.

Fabián E. Gallina

reply via email to

[Prev in Thread] Current Thread [Next in Thread]