#!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import os
import touchpad
import maus
mausstatus = False
while True:
time.sleep(1)
if mausstatus != maus.ReadFile():
touchpadstatus = touchpad.ReadFile()
mausstatus = maus.ReadFile()
if mausstatus == False and touchpadstatus == False:
os.system("/usr/local/bin/touchpad.py")
elif mausstatus == True and touchpadstatus == True:
os.system("/usr/local/bin/touchpad.py")Add a code snippet to your website: www.paste.org