[Pythonmac-SIG] Lanchd + virtualenv
Ronald Oussoren
ronaldoussoren at mac.com
Wed Sep 30 21:55:30 CEST 2009
On 30 Sep, 2009, at 17:31, Gabriel Rossetti wrote:
> Ronald Oussoren wrote:
>>
>> On 25 Sep, 2009, at 14:56, Gabriel Rossetti wrote:
>>
>>> Hello everyone,
>>>
>>> I would like to create a Launchd plist entry to start a virtualenv
>>> and run a python project. I created my plist, but I'm not sure how
>>> to get it to activate the virtualenv and run the program.
>>
>> Unless you do something special you don't have to activate the
>> virtualenv at all, just make sure that the '#!' line in the script
>> you're starting refers to the python in the virtualenv (instead of
>> having '#!/usr/bin/env python').
>>
>> I have a virtualenv containing a mercurial installation and
>> regularly use the mercurial command-line tools without activating
>> the virtualenv.
>>
>> Ronald
>>
> Ok, thanks, so from what I understand I only need to activate it if
> I have to install a package into it.
You only have to activate when you need to have executables from the
virtualenv on your shell's search-path (that is $PATH). Activating is
handy when you are installing software, but is also needed when a
script in the virtualenv executes another script in the environment
and assumes that that other script is on the search-path.
Ronald
>
> Gabriel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2224 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20090930/e99c3f09/attachment.bin>
More information about the Pythonmac-SIG
mailing list