Python open a named pipe == hanging?

Rochester rochester1976 at gmail.com
Fri Aug 4 11:36:39 EDT 2006


Thank you for your advise.  So, it turns out that fifos are quite useless  
in Python programming then, which is quite disappointing to me :-(

I am not saying that I _have to_ use fifo, afterall it is a rather odd  
thingy not in fasion since the last iceage... I am just disappointed by  
the fact that the old plain Bash seems to excel Python in this special  
aspect.

I am new to Python and much more comfortable in Bash programming.  A  
simple Bash script like this would take the advantage of a fifo, hence  
reduce the overhead of unneccesarry temporary files creation:

#!/bin/bash

mkfifo my_fifo
echo "this is a string in my fifo!" > my_fifo &
cat my_fifo
rm my_fifo

Isn't it neat?

Anyway, I think every scripting language has its pros and cons.  Bash is  
probably more flexible in dealing with fifos and multiway pipes (through  
the magic menchanism of process substitution).

Thank you!


On Thu, 03 Aug 2006 22:13:56 -0400, Alex Martelli <aleax at mac.com> wrote:



More information about the Python-list mailing list