power/usb_acpi.py

9 lines
133 B
Python

import sys
import time
with open('/dev/hidg0', 'wb') as f:
f.write(b'\x01')
time.sleep(0.3)
f.write(b'\x00')
sys.exit()