I am making a python program, whose output (not input) can be viewed via the screen program. However, the problem is that doing this allows the user to turn off the program via the Keyboard Interrupt (Control + C).

I don't anyone to do this, as the python program must always be on but there may be other people who want to see its output.

Any ideas? The screen program is launched in bash script.

  • Can't you catch the keyboard interrupt in the python program (try: .... except KeyboardInterrupt: ...) and have it continue in some sensible way? – Anthon Jul 15 '15 at 18:01

Log the Python program's output to a file and give people read permissions on the log file. They can use tail -f to watch it grow.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.