Fixed relative path problem

This commit is contained in:
Mattia Mascarello 2021-08-30 00:43:45 +02:00 committed by GitHub
parent c6ad364f41
commit a4cdf43686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@
from evdev import InputDevice, categorize, ecodes from evdev import InputDevice, categorize, ecodes
import configparser, os import configparser, os
config = configparser.ConfigParser() config = configparser.ConfigParser()
config.read('config.ini') config.read(os.path.dirname(os.path.realpath(__file__))+'/config.ini')
def sysrun(command): def sysrun(command):
os.system(command+ " &") os.system(command+ " &")
dev = InputDevice(config["DEVICE"]["path"]) dev = InputDevice(config["DEVICE"]["path"])