Mercurial > repos > george-weingart > micropita
comparison micropita_prepare.py @ 26:50a5e03dda85 draft
Micropita Prepare - fixed inconsistencies between spaces and tabs
author | george-weingart |
---|---|
date | Tue, 22 Jun 2021 03:16:37 +0000 |
parents | 1a2f01b31cf3 |
children | 041787cd0d31 |
comparison
equal
deleted
inserted
replaced
25:1a2f01b31cf3 | 26:50a5e03dda85 |
---|---|
85 ################################################################################## | 85 ################################################################################## |
86 # Main Program # | 86 # Main Program # |
87 ################################################################################## | 87 ################################################################################## |
88 parser = read_params( sys.argv ) | 88 parser = read_params( sys.argv ) |
89 results = parser.parse_args() | 89 results = parser.parse_args() |
90 #root_dir = os.environ.get('micropita_SCRIPT_PATH') #Using this | 90 #######root_dir = os.environ.get('micropita_SCRIPT_PATH') |
91 root_dir = os.path.dirname(os.path.realpath(__file__)) #Find the current directory where the program resides GW 20160810 | 91 root_dir = os.path.dirname(os.path.realpath(__file__)) #Find the current directory where the program resides GW 20160810 |
92 | 92 |
93 fname = results.inputname | 93 fname = results.inputname |
94 input_file = open(fname,'rU') | 94 input_file = open(fname,'rU') |
95 input_lines = input_file.readlines() | 95 input_lines = input_file.readlines() |
151 os.system(os_command) | 151 os.system(os_command) |
152 argsx = shlex.split(os_command) #Split the command | 152 argsx = shlex.split(os_command) #Split the command |
153 try: | 153 try: |
154 subprocess.check_call(argsx , shell=False) | 154 subprocess.check_call(argsx , shell=False) |
155 except: | 155 except: |
156 print "The call to micropita failed=============" | 156 print ("The call to micropita failed=============") |
157 sys.exit(0) | 157 sys.exit(0) |
158 | 158 |
159 | 159 |
160 | 160 |
161 if results.MParameter == "representative"\ | 161 if results.MParameter == "representative"\ |
173 argsx = shlex.split(os_command) #Split the command | 173 argsx = shlex.split(os_command) #Split the command |
174 try: | 174 try: |
175 ###os.system(os_command) | 175 ###os.system(os_command) |
176 subprocess.check_call(argsx , shell=False) | 176 subprocess.check_call(argsx , shell=False) |
177 except: | 177 except: |
178 print "The call to micropita failed=============" | 178 print ("The call to micropita failed=============") |
179 sys.exit(0) | 179 sys.exit(0) |
180 | 180 |
181 | 181 |
182 | 182 |
183 | 183 |
196 #print os_command | 196 #print os_command |
197 argsx = shlex.split(os_command) #Split the command | 197 argsx = shlex.split(os_command) #Split the command |
198 try: | 198 try: |
199 subprocess.check_call(argsx , shell=False) | 199 subprocess.check_call(argsx , shell=False) |
200 except: | 200 except: |
201 print "The call to micropita failed=============" | 201 print ("The call to micropita failed=============") |
202 sys.exit(0) | 202 sys.exit(0) |