How about this?
self.fd = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
Chuck Swiger wrote:
Hi All - looking for clues on how to include a file descriptor sink with
wxpython - for example, if I add code to
gnuradio-examples/python/usrp/fft_usrp.py
at the end of
-------------------------------------------------------------------------
class app_flow_graph (stdgui.gui_flow_graph):
def __init__(self, frame, panel, vbox, argv):
stdgui.gui_flow_graph.__init__ (self, frame, panel, vbox, argv)
(existing code)
# open socket output
port=7001
fd = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
fd.connect(('192.168.1.53',7001))
file = gr.file_descriptor_sink(gr.sizeof_gr_complex,fd.fileno() )
self.connect(self.u,file)
------------------------------------------------------------------------
we get the old 'stale file descriptor' out of scope trick when init exits.
In some other application I put this at the end of an init block and can
make
it work using fg.run, but of course you don't get the gui window since
init does NOT exit. Can the fd be 'return'ed or put in a mainloop()
somewhere?
--Chuck
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
--
Krzysztof Kamieniecki
callsign:KB1KLB
mailto:[EMAIL PROTECTED]
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio