fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] Making env changes persistent to the current session?


From: Jeff Forcier
Subject: Re: [Fab-user] Making env changes persistent to the current session?
Date: Thu, 1 Dec 2011 12:21:29 -0800

On Thu, Dec 1, 2011 at 5:37 AM, Lars van der bijl
<address@hidden> wrote:
> as fabric is running as a sub process from the shell you initiated it
> from I don't think you can influence it's parent.
> I did sped some time looking this up for pyhton and couldn't find a
> way to do it.
> but maybe there are some clever clogs here who know how.

Unfortunately, to my knowledge you're correct -- subprocesses spawned
from a shell are unable to influence the invoking session. This is the
same for anything -- Python, a bash script, etc.

The only good way I've ever found to "do something useful and update
the current shell env" is to *source* shell scripts via the shell's
"source" function, which cannot be done in Python (the whole point is
for the shell to interpret a shell script "inline", and last I
checked, Bash or Zsh could not interpret Python natively.)

Best,
Jeff

-- 
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org



reply via email to

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