From: Karol L. <kar...@kn...> - 2007-01-29 23:47:09
|
It occurred to me that it might be beneficial to have two functions in the LogFile class that should be called before and after logfiles of any type are parsed. For instance, when working the GAMESS parser, I saw there was no final progress update and conversion of attributes to arrays. With these functions, that won't happen for any new parsers, changes can be made for all of them in one place, and the code will be clearer. Basically, everything in the parse() function of a parser before the "for line in inputfile" loop would go i nthe first function, and everything after in the second. As far as I can tell, there are no differences here between parsers, so is there a reason not to do this? To do this, however, inputfile, nstep, and oldstep (maybe something else, also?) need to be parser attributes. If this seems like a good idea, I'd be happy to do the necessary changes in a few days. Karol -- written by Karol Langner Tue Jan 30 00:26:31 CET 2007 |