From: Karol L. <kar...@kn...> - 2007-07-09 19:37:15
|
On Monday 09 July 2007 05:24, Noel O'Boyle wrote: > On 09/07/07, Karol Langner <kar...@kn...> wrote: > > Yes! This is something I mentioned some time ago, in a slightly different > > context. I tried pickling some time ago, and some parser attributes > > (logger, progress) were crashing it - with this kind of separation > > pickling would be possible without additional hacks. Also, I don't think > > the output from pickle is platform-independent, so I can't freely move it > > between the computers I do calculation on - here a text format is the > > safest. > > For the record, the output from Pickle *is* platform-independent (it's > actually just an ASCII file); the output from the faster cPickle is > *not* platform-independent (it's a binary file). Yes, I didn't look into that. > > Let's see if we are thinking along the same lines here. The parser would > > create a blank ParsedData object as an attribute in its parse() method, > > and possible return that object (return self.data)? So the syntax for > > using the > > > > parsers would need to change, to something like: > > >>> myparser = ccopen("....") > > >>> mydata = myparser.parse() > > >>> dir(mydata) > > > > ['aoname', 'natom', ....] > > > > >>> mydata is myparser.data > > > > True > > Exactly. Although I wouldn't called it ParsedData, as the information > didn't necessarily come from a parsing. Why not just call it something > like cclibData, or ccData (although we don't want to get confused with > Creative Commons)? OK... cclibData looks nice and is unique for sure. What information do you have in mind that would not come from a parsing? Output from the calculation methods? -- written by Karol Langner Mon Jul 9 21:31:36 EDT 2007 |