|
@@ -1,7 +1,7 @@
|
|
|
"""
|
|
|
Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
|
|
|
|
|
|
-Date: Wed Nov 15 10:17:38 2017
|
|
|
+Date: Wed Nov 15 13:39:38 2017
|
|
|
|
|
|
Model author: Yentl Van Tendeloo
|
|
|
Model name: Modelverse Visual Editor - Tkinter Version
|
|
@@ -543,21 +543,27 @@ class MainApp(RuntimeClassBase):
|
|
|
# Interestingly, threads don't work well with SCCD, so this is a gamble.
|
|
|
# On UNIX systems, a simple "select" statement would have sufficed in the SCCD condition, but Windows doesn't like elegant solutions...
|
|
|
def enqueue_output(out, queue):
|
|
|
+ print("Waiting for output")
|
|
|
for line in iter(out.readline, b''):
|
|
|
+ print("Getting input: " + str(line))
|
|
|
queue.append(line)
|
|
|
out.close()
|
|
|
|
|
|
self.output_queue = []
|
|
|
- p = threading.Thread(target=enqueue_output, arguments=[self.subprocess.stdout, self.output_queue])
|
|
|
+ p = threading.Thread(target=enqueue_output, args=[self.subprocess.stdout, self.output_queue])
|
|
|
p.daemon = True
|
|
|
p.start()
|
|
|
|
|
|
def _parallel_behaviour_init_modelverse_conversing_execute_SC_wait_subprocess_0_exec(self, parameters):
|
|
|
value = parameters[0]
|
|
|
# Send data to the spawned subprocess
|
|
|
- self.subprocess.stdin.write(value)
|
|
|
+ print("Write to stdin")
|
|
|
+ self.subprocess.stdin.write(value + "\n")
|
|
|
+ self.subprocess.stdin.flush()
|
|
|
+ print("Write OK")
|
|
|
|
|
|
def _parallel_behaviour_init_modelverse_conversing_execute_SC_wait_subprocess_1_exec(self, parameters):
|
|
|
+ print("Got output on stdout: " + self.output_queue[0])
|
|
|
self.raiseInternalEvent(Event("mv_data_input", None, [self.output_queue.pop(0), None]))
|
|
|
|
|
|
def _parallel_behaviour_init_modelverse_conversing_execute_SC_wait_subprocess_1_guard(self, parameters):
|
|
@@ -8264,7 +8270,7 @@ class ActivityExecutor(RuntimeClassBase, tk.Toplevel, SCCDWidget):
|
|
|
|
|
|
def _all_all_execute_execute_0_exec(self, parameters):
|
|
|
taskname = parameters[0]
|
|
|
- self.subprocess = subprocess.Popen([sys.executable, sys.argv[0], "--address", data['mv_address'], "--username", data['username'], "--password", data['password'], "--taskname", taskname, "--spawn", "run_chatwindow.py"])
|
|
|
+ self.subprocess = subprocess.Popen([sys.executable, sys.argv[0], "--address", data['mv_address'], "--username", data['username'], "--password", data['password'], "--taskname", taskname, "--spawn", "./run_chatwindow.py"])
|
|
|
|
|
|
def _all_all_execute_alter_context_result_check_next_0_guard(self, parameters):
|
|
|
return self.exec_output_signature
|