From: Fabian Ezequiel Gallina <galli.87@gmail.com>
To: "Andreas Röhler" <andreas.roehler@online.de>, emacs-devel@gnu.org
Subject: Re: Getting Python system paths for CEDET
Date: Sat, 13 Oct 2012 16:41:51 -0300 [thread overview]
Message-ID: <CABq4mQtVBOgeDKywcLA6nGucE33CTxPLnO-6vnMCTVeWzNWCWw@mail.gmail.com> (raw)
In-Reply-To: <87bog6cmqx.fsf@engster.org>
2012/10/13 David Engster <deng@randomsample.de>:
> Andreas Röhler writes:
>> Am 13.10.2012 14:26, schrieb David Engster:
>>> Andreas Schwab writes:
>>>> David Engster <deng@randomsample.de> 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.
Regards,
Fabián E. Gallina
next prev parent reply other threads:[~2012-10-13 19:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-13 9:28 Getting Python system paths for CEDET David Engster
2012-10-13 12:14 ` Andreas Schwab
2012-10-13 12:26 ` David Engster
2012-10-13 15:13 ` Andreas Röhler
2012-10-13 17:20 ` David Engster
2012-10-13 19:41 ` Fabian Ezequiel Gallina [this message]
2012-10-13 20:32 ` David Engster
2012-10-13 12:41 ` Andreas Röhler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABq4mQtVBOgeDKywcLA6nGucE33CTxPLnO-6vnMCTVeWzNWCWw@mail.gmail.com \
--to=galli.87@gmail.com \
--cc=andreas.roehler@online.de \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.