Is python a good choice for this task?

Cameron Laird claird at lairds.com
Wed Nov 13 08:04:04 EST 2002


In article <mailman.1037124201.17612.python-list at python.org>,
Justin Sheehy  <justin at iago.org> wrote:
>claird at lairds.com (Cameron Laird) writes:
>
>> I think Tcl's sub- process spawning is perceptibly easier than the
>> {popen,popen2, popen3} we most often recommend to newcomers.
>
>For running a simple command, I agree that Tcl's subprocess spawning
>is easier for a newcomer to understand than popen and friends.
>
>So why not recommend the "commands" module instead of popen for those uses?
>
>-Justin
>
>
> 
>
>
>

Good question.

It has answers at a couple of levels.  First, I
claim to observe that Python adepts more rarely
recommend commands than popen2.  I'll speculate
that this is an artifact of commands' late ap-
pearance in Python's standard distribution (was
it 1.5?).

*I*'ve never been able to get commands to do
anything useful under Windows.  It's embarras-
sing.  At the same time, I assumed there were
systematic non-portabilities behind my diffi-
culties.  The portability of Tcl's [exec] and
[open] is, frankly, impressive.

So:  at some point I need to figure out what
my problems with commands on NT and W95 are,
then re-run my comparison with the correspond-
ing Tcl facilities.
-- 

Cameron Laird <Cameron at Lairds.com>
Business:  http://www.Phaseit.net
Personal:  http://phaseit.net/claird/home.html



More information about the Python-list mailing list