From 1a4abf4f1b3a7a95a9320c0739a2369de68838e9 Mon Sep 17 00:00:00 2001 From: brenda-br Date: Sat, 4 Mar 2023 12:19:14 +0530 Subject: Console not popping up when simulating --- src/main/python/OMChem/Flowsheet.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/python/OMChem/Flowsheet.py') diff --git a/src/main/python/OMChem/Flowsheet.py b/src/main/python/OMChem/Flowsheet.py index c862299..a83ac4e 100644 --- a/src/main/python/OMChem/Flowsheet.py +++ b/src/main/python/OMChem/Flowsheet.py @@ -1,6 +1,6 @@ import os import csv -from subprocess import Popen, PIPE +from subprocess import Popen, PIPE,STARTUPINFO,STARTF_USESHOWWINDOW import pandas as pd class Flowsheet(): @@ -54,8 +54,9 @@ class Flowsheet(): if self.sim_method == 'Eqn': simpath = self.eqn_mos_path os.chdir(self.sim_dir_path) - - self.process = Popen([self.omc_path, '-s',simpath], stdout=PIPE, stderr=PIPE) + startupinfo = STARTUPINFO + startupinfo.dwFlags |= STARTF_USESHOWWINDOW + self.process = Popen([self.omc_path, '-s',simpath], stdout=PIPE, stderr=PIPE, startupinfo=startupinfo) self.stdout, self.stderr = self.process.communicate() os.chdir(self.root_dir) -- cgit