How could I put filename which contains variables?
After I define a variable time with a value of 20150609. I want to
use
a file /my/file/path/sample20150609 as a file source.
In file field (filename) in file source block, how can I refer such a
variable? I put variable name in the field, but it seems the GRC regards
it
as a string literal.
Every time before I run the GRC flow graph, I want to clear the
reports
(console log).
I think it is possible if I put something in .grc file in the home
directory. But, I have no idea about that something.
will give you
/home/marcus//samples/20150609-08-59-25.332123.dat
notice the length of each number and the padding with zero of the hour.
Possibly, GRC tries to figure out whether what you’ve entered into the
text field is just text (and must be surrounded by " ) or python code,
and goes wrong.
There’s no setting I’d know of that would enable that; the only way I
can find in the source code is View->Clear Reports, which triggers the
CLEAR_REPORT GRC Action; if you feel like it, you could add a “clear
reports on flow graph launch” checkbox there and modify the Action that
happens when you click on “run” to include conditional clearing of the
reports.
I’ve tried and seen that str(var) appears as it is. And I thought it
didn’t work. But according to your answer, it is converted to a string
properly when py file was generated and executed. Is it right?
And for clearing reports, your suggestion is to modify source code of
GRC
app itself. I’ll try it later.