It was interesting working out how to run the script in background with the terminal disassociated, but like everything else, it turned out to be easy once I figured it out. Seems the python interpreter doesn't output text when you disassociate the terminal so you can't tell it's working. That is unless you discover the secret parameter '-u' that makes it flush the output. The command turned out to be:
nohup python -u scriptname.py > logfile &
Then you can 'tail -f logfile' to see what's happening. None of this is unusual for *nix systems, it's just annoying to have to do a web search every 2.7 seconds to find out something that isn't obvious. I'm sure it will get better over time ... maybe.
So, I have a way of grabbing and logging it to the cloud now and I'm testing ideas for temporary storage of the various data for web presentation. Feels like some progress.
No comments:
Post a Comment