Guest User

Untitled

a guest
Mar 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #!/usr/bin/env python
  2. from gpiozero import Button
  3. from signal import pause
  4. import os
  5. def runboth():
  6. os.system("~/Desktop/script/script_a.sh")
  7.  
  8. os.system("~/Desktop/script/script_b.sh")
  9.  
  10.  
  11. runboth_btn = Button(23, hold_time=2)
  12. runboth_btn.when_held = runboth
  13.  
  14.  
  15. pause()
Add Comment
Please, Sign In to add comment