improving performance of writing into a pipe

mikprog at gmail.com mikprog at gmail.com
Tue Feb 19 11:27:04 CET 2013


> 
> Once you get your script working you can try to provoke errors, and for 
> 
> those errors you can recover from you can write error handlers. For IOError 
> 
> and Python < 3.3 that may involve inspecting the errno attribute and 
> 
> conditionally reraising.


Ok.



> By the way, I don't think
> 
> 
> >> >     PIPEPATH = ["/tmp/mypipe"]
> 
> >> >             self.process = os.popen( self.PIPEPATH, 'w')
> 
> 
> 
> can work. As a few people already told you the built-in open()


Few people?
I thought Oscar was a singular person, not a group of people :-)
Seriously, I am convinced by that approach (thanks) and I wish to go that way, but the problem I am getting now is that the open fails and then I can't go on.

Also, I am now looking at the subprocess as os.popen seems deprecated.
Any opinion on that?
Thanks for your suggestion.

Mik



More information about the Python-list mailing list