diff options
author | brenda-br | 2023-03-04 12:19:14 +0530 |
---|---|---|
committer | brenda-br | 2023-03-04 12:19:14 +0530 |
commit | 1a4abf4f1b3a7a95a9320c0739a2369de68838e9 (patch) | |
tree | 71b80cb279c874d885bf30bcb1797b6f6ef4e4ed /src/main/python/OMChem/Flowsheet.py | |
parent | 78b24f6e3fc801bd20473bdeaaf868d1c727bbd2 (diff) | |
download | Chemical-Simulator-GUI-1a4abf4f1b3a7a95a9320c0739a2369de68838e9.tar.gz Chemical-Simulator-GUI-1a4abf4f1b3a7a95a9320c0739a2369de68838e9.tar.bz2 Chemical-Simulator-GUI-1a4abf4f1b3a7a95a9320c0739a2369de68838e9.zip |
Console not popping up when simulating
Diffstat (limited to 'src/main/python/OMChem/Flowsheet.py')
-rw-r--r-- | src/main/python/OMChem/Flowsheet.py | 7 |
1 files changed, 4 insertions, 3 deletions
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) |