pipe in read and write mode

Mirko Liss mirko.liss at web.de
Mon Jul 16 08:46:58 EDT 2001


On Mon, 16 Jul 2001, Raphael Bauduin wrote:

> I want to pipe the standard input of my script to a command. I use popen, 
> and it's fine. However, I want to take the standard output of the command 
> and put it in a variable. I can't open the pipe in read and write mode. I 
> made it work by redirecting the output of the pipe to a file, and reading 
> this file. I would prefer not to write it to a temporary file, as the text 
> piped is somewhat sensitive (I use the script to encrypt it, so it would be 
> better not to write it to a file ;-)

There's a marvellous documentation that came with your 
Python distribution. Just read the chapter about the 
                
              =====  'popen2' =====
              
module.

You might want to look at www.python.org as well.



regards,

Mirko




More information about the Python-list mailing list