On Fri, 22 Jul 2005 10:56:22 -0500,
David Durkee <[EMAIL PROTECTED]> wrote:

> I didn't get much from the discussion of Command Substitution. Any  tips
> on how to do that?

I don't use tcsh, so there may be some subtleties I don't get, but it's
going to look something like this:

----------------changefoo.py
print 'setenv foo bar'
----------------end of changefoo.py

Then the shell session would look like this:

    % `python changefoo.py`
    % echo $foo
    bar

or you may need to "eval" the output:

    % eval `python changefoo.py`
    $ echo $foo
    bar

or you could it like this:

----------------changefoo.py:
print 'foo bar'
----------------end of changefoo.py

Then the shell session would look like this:

    % setenv `python changefoo.py`
    % echo $foo
    bar

But we're veering dangerously off topic for c.l.python.

HTH,
Dan

-- 
Dan Sommers
<http://www.tombstonezero.net/dan/>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to