[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] Pipe Tricks
From: |
cswiger |
Subject: |
[Discuss-gnuradio] Pipe Tricks |
Date: |
Wed, 6 Apr 2005 11:17:05 -0400 (EDT) |
Trying
pipe_fd = open("/pipe","r")
gr.file_descriptor_source(gr.sizeof_char,pipe_fd.fileno())
starts out but as soon as I start the source to fill the pipe
I get:
file_descriptor_source[read]: Bad file descriptor
and the pipe filling script reports IOError: [Errno 32] Broken pipe
BTW, opening and reading the pipe manually in python works ok:
>>> fd=open("/pipe","r")
>>> a=fd.read(5)
>>> a
'\xaa\xaa\xaa\xaa\xaa'
where \xaa is the expected idle character read w/o having to close
the pipe at the source. Again, using gr.file_source(pipe) works
fine but only after the source closes the pipe. Oh, and yes there
is fd.flush() after ever fd.write(chr(c)) in the source script.
--Chuck
- [Discuss-gnuradio] Pipe Tricks,
cswiger <=