discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] File Sink - Question


From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] File Sink - Question
Date: Sat, 25 Feb 2017 11:29:05 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

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, unless it's really intended to accept backslash escapes inside an un-quoted string in which case you need to double all the backslashes or just use forward slashes.


Not clear this is a bug in GRC.  Nearly all parameters in GRC blocks are simply Python expressions.   In order to deliver the "least astonishment"
  criterion for Windows users, there'd need to be an exception to that paradigm just for the file-sink block, which would violate the
  "least astonishment" criterion for other users.    I don't think there's any "win" available here, other than having the user double-up the
  backlashes.






reply via email to

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