On Wed, Aug 3, 2011 at 8:29 AM, Phlip <phlip2...@gmail.com> wrote:
> Groupies:
>
> This is either a code snippet, if you like it, or a request for a
> critique, if you don't.
>
> I want to call a command and then treat the communication with that
> command as an object. And I want to do it as application-specifically
> as possible. Anyone could think of a way to productize this:
>
> def command(*cmdz):
>
>    process = Popen( flatten(cmdz),

flatten() being defined as...?

>                     shell= True,

I would strongly encourage you to avoid shell=True. You really don't
want to have to worry about doing proper shell escaping yourself.

>                     stdout= subprocess.PIPE,
>                     stderr= subprocess.PIPE,
>                     bufsize= 4096 )

Cheers,
Chris
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to