Simple process IO capture (Was: "shell-commands" and python!) - process.py (0/1)
Lee Harr
missive at frontiernet.net
Sun Sep 23 17:17:40 EDT 2001
> >>> output = process.run("echo hello")
> >>> print output
> hello
> >>> print process.run("tr a-z A-Z", input="hello")
> HELLO
>
> What do people think? Is this a useful idea?
>
I think it is beautiful. Quite pythonic in my view.
I was looking to do something like this just last week. This would
have been _very_ useful to me.
Not sure what the big hullabaloo is about creating a module which
will allow this sort of functionality from python. Personally, I
find shell scripts to be generally ugly and unmaintainable.
To do something similar from python would clearly be better.
I hope something like this eventually gets in to the standard
distribution.
More information about the Python-list
mailing list