extract exit number from MSC out-file. Other MSC utility functions can also go into MSC_TOOLS class.
This commit is contained in:
parent
8ac1891b3c
commit
93b2160c2f
|
@ -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
|
Loading…
Reference in New Issue