Skip to main content
Missing close quote
Source Link
Chris Davies
  • 128.2k
  • 16
  • 179
  • 324

Edit your python program and let it check for a 'do not run' file first. If such file exists, exit your program i.e.

import os.path
if os.path.isfile('/tmp/disable_mypythondisable_mypython'): exit()

If you check for a file called for instance /tmp/disable_mypython you can easily 'disable' your program using:

touch /tmp/disable_mypython

and enable it again using:

rm /tmp/disable_mypython

Edit your python program and let it check for a 'do not run' file first. If such file exists, exit your program i.e.

import os.path
if os.path.isfile('/tmp/disable_mypython): exit()

If you check for a file called for instance /tmp/disable_mypython you can easily 'disable' your program using:

touch /tmp/disable_mypython

and enable it again using:

rm /tmp/disable_mypython

Edit your python program and let it check for a 'do not run' file first. If such file exists, exit your program i.e.

import os.path
if os.path.isfile('/tmp/disable_mypython'): exit()

If you check for a file called for instance /tmp/disable_mypython you can easily 'disable' your program using:

touch /tmp/disable_mypython

and enable it again using:

rm /tmp/disable_mypython
Source Link
Lambert
  • 12.8k
  • 2
  • 28
  • 35

Edit your python program and let it check for a 'do not run' file first. If such file exists, exit your program i.e.

import os.path
if os.path.isfile('/tmp/disable_mypython): exit()

If you check for a file called for instance /tmp/disable_mypython you can easily 'disable' your program using:

touch /tmp/disable_mypython

and enable it again using:

rm /tmp/disable_mypython