dool
dool copied to clipboard
When specfying `--output `-dool still prints on stdout
When specfying --output -dool still prints on stdout.
I expected dool to exclusivley print to a file.
I fixed this on my local version by introducing an if statement inside the perform function. (~/2868)
if op.output and step == op.delay:
outputfile.write(oline + '\n')
else:
sys.stdout.write(line + theme['input'])
if op.debug:
/,,,,
PS - Something else that is pretty weird is that the output dosen't follow the delay. The csv file is HUGE and adds several thousand lines every few seconds when it flushes. Not sure why
+1. I tried running this on a bash script to perform. Couldn't get it done due to this issue.
As another datapoint, I prefer the current behaviour, so that I can monitor the data as it's being recorded. You can always redirect the output to /dev/null in a script if you don't want it.
The output file is not written until sending ctrl+c to "dool --output test.log" . i think it's not proper....
I just landed some code that addresses all of these things:
--output /tmp/foo.csvwill output only to a file- Output file respects the delay again
- Fixed the output going line by line to the file so you can run
tail -fon it as it writes - Added a
--displayoption so you can write to a file and display on your screen
Example: dool --more --output /tmp/foo.csv --display 15
Please test and let me know.
This code has landed and will be in the next release.