[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to pipe from python script to system process that script starts



On Mon, Sep 03, 2007 at 08:05:16AM -0700, Freddy Freeloader wrote:
> So far I've coded everything as process oriented rather than object 
> oriented as that is what I am familiar with, but I'm beginning to believe 
> that using classes is probably the way to go as it would be much easier to 
> abstract concepts out that way.  If someone has an example or two they 
> could share with me on how to do interprocess piping in either oo or 
> process oriented, or both, manner I would appreciate the help.

Read the documentation for os.popen. It opens the command and it's
stdin and stdout as pipes.

The commands module might also be of interest.

Kumar

-- 
Kumar Appaiah,
458, Jamuna Hostel,
Indian Institute of Technology Madras,
Chennai - 600 036



Reply to: