I think you're mixing things up. open() like you use it is a call to generate a python "file" object, which is not the file descriptor a file_destructor_sink needs. open() expects a string, but you offer a socket_pdu shared pointer (ie. the python (swig) representation of the C++ block of that name).
I don't really understand what you are trying to do; could you explain? I'm fairly certain file_descriptor_sink is not what you want... Greetings, Marcus On 30.05.2014 19:46, Ruecan wrote: > I mean if I try this: > >> self.blocks_socket_pdu_0_Rx = blocks.socket_pdu("UDP_CLIENT", "localhost", >> "4000", 10000) > self.myFileDescriptor = blocks.file_descriptor_sink(2048, > open(self.blocks_socket_pdu_0_Rx, 'r+b')) > > I got: > TypeError: coercing to Unicode: need string or buffer, socket_pdu_sptr found > > I don't know how to get a file descriptor out of that to read it and > retrieve packets received. > > > > -- > View this message in context: > http://gnuradio.4.n7.nabble.com/Using-file-descriptor-sink-tp48640p48647.html > Sent from the GnuRadio mailing list archive at Nabble.com. > > _______________________________________________ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio