Skip to content

Commit

Permalink
assume script knows how to run
Browse files Browse the repository at this point in the history
  • Loading branch information
teuben committed Sep 6, 2023
1 parent 5c97dc8 commit 2340eaf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions qtrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@ def initUI(self):
self.createWidgetsFromGroups()

# runs the file. takes the input file and runs it, piping the set paraments into the file as args
# it assumes the script can self-execute with the appropriate #! directive on the first line
def run(self):
contents = self.gather_data()
param = ""
param = self.input_file
for line in contents:
for key, value in line.items():
param += f"{key}={value} "
subprocess.run([self.input_file_type, self.input_file] + param.split())
param += f" {key}={value}"
subprocess.run(param.split())

# saves the options into a separate file named inputfilename.key. Thiswill be saved in the format
# key=value and formatted according to the input file type.
Expand Down

0 comments on commit 2340eaf

Please sign in to comment.