YATOPS (Yet Another Thread on Python's Speed) (was Re: HELP! Must choose language!)

Mike Meyer mwm at mired.org
Tue Jan 7 23:24:52 EST 2003


Yu Wang <Yu.Wang at synopsys.com> writes:
> I still remember my CSH scripts full of "$" and "\" "/" that make my
> eyes green.

:-). You had it lucky. Contemplate the following:

(($+functions[_p4_pending_changelists])) ||
_p4_pending_changelists () {
    compadd "$@" ${${${(f)"$(p4 changes -s pending 2>/dev/null)"}#* }%% *}
}

> I'm wondering whether there'll be a easy way to implement Shell commands.
> Like Perl does with "``".

And what's wrong with os.popen? Sure, it's a bit more verbose than
`...`, but that's not necessarily a bad thing. Personally, I quite
writing `...` even in the shell, and use $(...) for readability these
days.

        <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.




More information about the Python-list mailing list