[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] File Sink - Question

From: Kevin Reid
Subject: Re: [Discuss-gnuradio] File Sink - Question
Date: Sat, 25 Feb 2017 08:44:35 -0800

On Sat, Feb 25, 2017 at 8:29 AM, Marcus D. Leech <address@hidden> wrote:
On 02/25/2017 11:14 AM, Kevin Reid wrote:
On Sat, Feb 25, 2017 at 8:09 AM, Ellie White <address@hidden> wrote:
    self.blocks_file_sink_0 = blocks.file_sink(gr.sizeof_float*512, "C:\Users\Ellie\fm_data.dat", False)

Your problem is here. Those backslashes need to be escaped in the string literal.

Since this code was generated by GRC then this would seem to be a bug in GRC, [...]
Not clear this is a bug in GRC.  Nearly all parameters in GRC blocks are simply Python expressions.

But the text entered in GRC, in this case, is not quoted, so it is not a Python _expression_. Implicitly adding quotes but not implicitly escaping backslashes is, in my opinion, an inconsistent choice.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]