FIFO in python?
David Lees
DavidL at NOraqiaSPAMMY.com
Tue Dec 19 14:23:19 EST 2000
Actually, I just found that if I try to write to the fifo (which is
SAMBA mounted) from the NT side, I get an error:
IOError: (0, 'Error')
Meanwhile on the Linux, side, our local perl guru had no trouble getting
a pair of perl scripts to pass strings via the same fifo that I am
unable to open when I run Python from Linux.
Presumably this is some kind of configuration problem with python?
david lees
David Lees wrote:
>
> I am trying to learn how to use FIFO and am unable to open a fifo under
> Linux RedHat 6.2. I hang on the open (open(fn,'rw'), even though I have
> done a successful check for file existence (os.path.exists(fn)). The
> same code works under NT. Any thoughts on what is going on?
>
> Thanks in advance,
>
> david lees
>
> here is my code:
> -------------------------
> import string, os, sys
>
> def OpenFileRW(n):
> if os.path.exists(n):
> fn=open(n,'rw')
> return fn
> else:
> print 'Filename '+name+' does not exist'
> sys.exit(-1)
>
> fifoName='junkfifo'
> fifo=OpenFileRW(fifoName)
> fifo.close()
> print 'done'
More information about the Python-list
mailing list