[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Help req file_sorce data type
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] Help req file_sorce data type |
Date: |
Wed, 6 Jan 2010 09:52:20 -0800 |
User-agent: |
Mutt/1.5.20 (2009-08-17) |
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<floats>, 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