From 93b2160c2facf13a87b031012c0a9873d38a1b8f Mon Sep 17 00:00:00 2001 From: Claudio Zambaldi Date: Mon, 24 Oct 2011 12:59:46 +0000 Subject: [PATCH] extract exit number from MSC out-file. Other MSC utility functions can also go into MSC_TOOLS class. --- processing/post/msc_tools.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 processing/post/msc_tools.py diff --git a/processing/post/msc_tools.py b/processing/post/msc_tools.py new file mode 100644 index 000000000..c50c4b307 --- /dev/null +++ b/processing/post/msc_tools.py @@ -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