Hi,
I am trying to write to a linux pipe/fifo, but sadly this seems to freeze
python. I am using Ubuntu 10.04 and gnuradio 3.2.2.dfsg-1ubuntu1.
Please try to execute the code and tell me why this makes the app pause.
#! /usr/bin/python
# Import stuff
from gnuradio import gr, gru, eng_notation, optfir
from gnuradio.eng_option import eng_option
from gnuradio.wxgui import slider, powermate
from gnuradio.wxgui import stdgui2, fftsink2, form, scopesink2
import sys
import os
# Main application
class main_app (stdgui2.std_top_block):
def __init__(self,frame,panel,vbox,argv):
stdgui2.std_top_block.__init__ (self,frame,panel,vbox,argv)
print '!!!Cleanup'
os.spawnlp(os.P_WAIT, 'rm', 'rm','/tmp/gnutest1.raw')
os.spawnlp(os.P_WAIT, 'rm', 'rm','/tmp/gnutest2.raw')
print '!!!make a fifo'
os.spawnlp(os.P_WAIT, 'mkfifo', 'mkfifo','/tmp/gnutest1.raw')
print '!!!make file sink without the fifo'
outok = gr.file_sink(gr.sizeof_short,'/tmp/gnutest2.raw')
print '!!!make file sink with the fifo (FREEZING)'
outcrash = gr.file_sink(gr.sizeof_short, '/tmp/gnutest1.raw')
print '!!!everything went better than expected'
if __name__ == '__main__':
app = stdgui2.stdapp (main_app, "crashtest")
app.MainLoop ()
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio