aboutsummaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorAnthony Wang2024-01-30 21:59:19 -0500
committerAnthony Wang2024-01-30 21:59:19 -0500
commita5bfafa8a7940be17ee059d50ddc3c77445ea3d6 (patch)
tree875e2a706f2881c9bf7f1d0759d6060b272c198f /main.py
parent33b76d4106a2024e8f095c7bbb232482b7883eee (diff)
Use sd binary in same directory as scripts instead of needing to pass path to sd binary
Diffstat (limited to 'main.py')
-rwxr-xr-x[-rw-r--r--]main.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.py b/main.py
index 8bba5b5..9d821d1 100644..100755
--- a/main.py
+++ b/main.py
@@ -1,3 +1,5 @@
+#!/usr/bin/python
+
import subprocess
import sys
from PyQt6.QtWidgets import QApplication, QMainWindow, QLabel
@@ -14,7 +16,7 @@ class SDGUI(QMainWindow):
# Start SD
self.proc = subprocess.Popen(
- sys.argv[1:] + ['-n'], stdin=subprocess.PIPE, stdout=subprocess.PIPE
+ [sys.path[0] + '/sd', *sys.argv[1:], '-n'], stdin=subprocess.PIPE, stdout=subprocess.PIPE
)
# Display key