Hi,
When we do: data = gr.file_source(8, ‘s1’, ‘r’)
Then type( data ) = <class
‘gnuradio.gr.gnuradio_swig_py_io.gr_file_source_sptr’>
how can i convert data into a string??
Regards,
Nadia
Hi,
When we do: data = gr.file_source(8, ‘s1’, ‘r’)
Then type( data ) = <class
‘gnuradio.gr.gnuradio_swig_py_io.gr_file_source_sptr’>
how can i convert data into a string??
Regards,
Nadia
On Wed, Jan 06, 2010 at 09:45:10AM +0000, nadia raj wrote:
Hi,
When we do: data = gr.file_source(8, ‘s1’, ‘r’)
Then type( data ) = <class ‘gnuradio.gr.gnuradio_swig_py_io.gr_file_source_sptr’>
how can i convert data into a string??Regards,
Nadia
Generally you wouldn’t.
If you just want the contents of a file as a string, use the built-in
Python routines:
s = open(‘s1’).read()
If what you really want is to be able to examine a file containing
binary floats or complex, then you’ll probably want to use
something
like octave and the utilities in gnuradio-core/src/utils/read_*_binary.m
Also, please take a look at
http://gnuradio.org/redmine/wiki/gnuradio/ReportingErrors
It’s got lots of tips on how to ask questions in a way that increases
your chances of getting the assistance you’re looking for.
Also, try googling “using octave and gnu radio”
Eric
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs