Q
qqcq6s59
Hi all
I am a newbie and I just saw a ongoing thread on Fileprocessing which
talks abt config parser.
I have writen many pyhton program to parse many kind of text files by
using string module and regex. But after reading that config parser
thread I feel stunned.
Can somebody tell me some intro info how to parse huge data (most of
them are input data to application softwares like nastran, abaqus etc)
Recently I saw a great work by John on Nastran file parser (i am still
trying to understand the program,
http://jrfonseca.dyndns.org/svn/phd/python/Data/Nastran/
An example of dat may be like this, (part of)
(say point id coordinateSysNo x,y,z ...)
GRID 1 12478.0 0.0 256.75 1
GRID 2 12357.25 0.0 256.75 1
GRID 3 12357.25 0.0 199.0 1
(say Elementtype id property point1 point 2 point3 point4 etc)
CQUAD4 7231 21 5691 5700 5701 56920.0
CQUAD4 7232 21 5692 5701 5702 56930.0
CQUAD4 7233 21 5693 5702 5703 56940.0
the data file is very complex if i consider all complexities)
Is is possible to use config parser module insome way for this. I also
have few perl parser (for some part for some particular tasks) and now
changing them to python. (I feel perl regex combination is very easy to
learn and very powerfull)
Any information will be appreciated.
-jiro
I am a newbie and I just saw a ongoing thread on Fileprocessing which
talks abt config parser.
I have writen many pyhton program to parse many kind of text files by
using string module and regex. But after reading that config parser
thread I feel stunned.
Can somebody tell me some intro info how to parse huge data (most of
them are input data to application softwares like nastran, abaqus etc)
Recently I saw a great work by John on Nastran file parser (i am still
trying to understand the program,
http://jrfonseca.dyndns.org/svn/phd/python/Data/Nastran/
An example of dat may be like this, (part of)
(say point id coordinateSysNo x,y,z ...)
GRID 1 12478.0 0.0 256.75 1
GRID 2 12357.25 0.0 256.75 1
GRID 3 12357.25 0.0 199.0 1
(say Elementtype id property point1 point 2 point3 point4 etc)
CQUAD4 7231 21 5691 5700 5701 56920.0
CQUAD4 7232 21 5692 5701 5702 56930.0
CQUAD4 7233 21 5693 5702 5703 56940.0
the data file is very complex if i consider all complexities)
Is is possible to use config parser module insome way for this. I also
have few perl parser (for some part for some particular tasks) and now
changing them to python. (I feel perl regex combination is very easy to
learn and very powerfull)
Any information will be appreciated.
-jiro