Python as a scripting language. Alternative to bash script?

Stephen Hansen me+list/python at ixokai.io
Mon Jun 28 16:28:48 EDT 2010


On 6/28/10 1:06 PM, Mithrandir wrote:
> Paul Rubin<no.email at nospam.invalid>  wrote in
> news:7xpqzbj8st.fsf at ruckus.brouhaha.com:
>
>> Re: Python as a scripting language. Alternative to bash script?
>
>> That's interesting but I'm having a hard time seeing how it would work.
>> I think environment variables didn't exist in early versions of Unix,
>> and argc/argv were passed to the child process on its stack.  I guess
>> the reverse side could involve the "wait" system call taking a callback
>> parameter with a buffer to receive the returned data.  But that still
>> only happens when the child actually exits, and presumably
>> intercommunicating netween programs should be bidirectional.  But Unix
>> has always had pipes for that.
>
>
> I can't see Python as an alt. to bash. (As I recall) Python is much more
> object-oriented than bash, but also there are many commands (such as apt-
> get, etc.) that would need Python equivs. However, I can see Python being
> used as a scripting alt. to C.

Wait, what? o.O

First, you don't really have to use any of the object-orientedness of 
Python. It doesn't push anything on you.

Second, why would apt-get need a Python equiv? Just use apt-get.

And, ... "a scripting alternative to C"? How's C a scripting anything, 
that you need an alternate for? :) I mean, "scripting" is what you use 
to push around C programs :)

-- 

    ... Stephen Hansen
    ... Also: Ixokai
    ... Mail: me+list/python (AT) ixokai (DOT) io
    ... Blog: http://meh.ixokai.io/




More information about the Python-list mailing list