Closed Jeroen6 closed 7 years ago
In general it looks like a useful feature. I like the '%' thing for specifying a timestamped output file. I'm away from my test machine at the moment (was on vacation away from e-mail, and am now on a business trip). There's one or two things I'd like to change, but I'll take a closer look and do some testing when I'm in my office (probably tomorrow).
With regards to the restart option, I'd like to double-check that this method works on Linux. I'm sure we can find something that works on multiple platforms.
Thanks for the enhancements! -- Tim
The restart function can be better. Preferably, without full restart. I did however fix an file close issue. I have my latest master running on a raspberry pi for a week now. So it works on linux.
I'm not a seasoned python developer, but I've added some features to make grabserial more useful when logging serial port data for longer periods of time.
Features like: -a, --again Restart application after -e expires or -q is triggered. -Q, --quiet Silent on stdout, serial port data is only written to file.
Modified -o, --output= to accept datetime formats like then "%Y-%m-%dT%H-%M-%S" when given a single "%". (iso 8601)
This was developed on windows, I'm not sure if the restart method like
os.execv(sys.executable, ['python'] + sys.argv)
will work properly on all platforms.Let me know what you think.