Re: Python open a named pipe == hanging?

2006-08-06 Thread Rochester
Thanks Alex, now I think I understand much better the fifo/pipe mechanism and how Python treats them. For those who are interested, I would like to restate the problem I was tring to solve and a working solution (inspired by Alex Martelli's code), feel free to criticize it: The problem: I

Re: Python open a named pipe == hanging?

2006-08-04 Thread Rochester
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

Python open a named pipe == hanging?

2006-08-03 Thread Rochester
Hi, I just found out that the general open file mechanism doesn't work for named pipes (fifo). Say I wrote something like this and it simply hangs python: #!/usr/bin/python import os os.mkfifo('my_fifo') open('my_fifo', 'r+').write('some strings.') x = os.popen('cat my_fifo').r