179def SFGenInitialize(Init, stdin=None):
180
181 logger.info("Starting SFGen Initialization")
182
183 if not os.path.exists('evrecs'):
184 os.makedirs('evrecs')
185 if not os.path.exists('outputs'):
186 os.makedirs('outputs')
187
188
189 try:
190 inputDAT = open('input.DAT')
191
192 except IOError:
193 raise Exception("Problem with file IO; potentially input.DAT not created correctly")
194 else:
195
196 try:
197 rc = run_command(Init.sfgenpath+"/bin/SFGen", inputDAT)
198
199 except OSError:
200 raise Exception("File not found")
201
202 except Exception:
203 raise Exception("Non-OSError or IOError in execution block")
204
205 if rc:
206 raise Exception('Unexpected error in sfgen execution in SFGenInitialize')
207
208 return
209
210
211