extract exit number from MSC out-file. Other MSC utility functions can also go into MSC_TOOLS class.

This commit is contained in:
Claudio Zambaldi 2011-10-24 12:59:46 +00:00
parent 8ac1891b3c
commit 93b2160c2f
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
class MSC_TOOLS():
def exit_number_from_outFile(outFile=None)
fid_out=open(outFile,'r')
for ln in fid_out:
if (string.find(ln,'tress iteration') is not -1):
print ln
elif (string.find(ln,'Exit number') is not -1):
substr=ln[string.find(ln,'Exit number'):len(ln)]
exitnumber=substr[12:16]
fid_out.close()
return exitnumber