From: <bao...@us...> - 2006-04-03 15:44:52
|
Revision: 48 Author: baoilleach Date: 2006-04-03 08:44:45 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=48&view=rev Log Message: ----------- When terminating loops by searching for blank lines, it is better to use: while line.strip(): line = inputfile.next() rather than: while line!="\n": line = inputfile.next() as the latter is not cross-platform (i.e. it failed on Linux when dealing with GAMESS files created on Windows). Two changes were made to the gamessparser in this respect. Modified Paths: -------------- trunk/src/cclib/parser/gamessparser.py Modified: trunk/src/cclib/parser/gamessparser.py =================================================================== --- trunk/src/cclib/parser/gamessparser.py 2006-04-03 15:01:48 UTC (rev 47) +++ trunk/src/cclib/parser/gamessparser.py 2006-04-03 15:44:45 UTC (rev 48) @@ -107,7 +107,7 @@ self.scfvalues = [] line = inputfile.next() den = [] - while line!='\n': + while line.strip(): # The SCF information is terminated by a blank line try: temp = int(line[0:4]) @@ -166,7 +166,7 @@ blank = inputfile.next() line = inputfile.next() numAtom = 0 - while line!="\n": + while line.strip(): numAtom += 1 line = inputfile.next() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |