Re: Ideas for parsing this text?

2008-04-24 Thread Gerard Flanagan
On Apr 24, 4:05 am, Paul McGuire [EMAIL PROTECTED] wrote: On Apr 23, 8:00 pm, Eric Wertman [EMAIL PROTECTED] wrote: I have a set of files with this kind of content (it's dumped from WebSphere): [propertySet [[resourceProperties [[[description This is a required property. This is an

Re: Ideas for parsing this text?

2008-04-24 Thread Mark Wooding
Eric Wertman [EMAIL PROTECTED] wrote: I have a set of files with this kind of content (it's dumped from WebSphere): [propertySet [[resourceProperties [[[description This is a required property. This is an actual database name, and its not the locally catalogued database name. The Universal

Re: Ideas for parsing this text?

2008-04-24 Thread Eric Wertman
Thanks to everyone for the help and feedback. It's amazing to me that I've been dealing with odd log files and other outputs for quite a while, and never really stumbled onto a parser as a solution. I got this far, with Paul's help, which manages my current set of files: from pyparsing import

Re: Ideas for parsing this text?

2008-04-24 Thread Paul McGuire
On Apr 24, 10:42 am, Eric Wertman [EMAIL PROTECTED] wrote: I'm sure there are cooler ways to do some of that.  I spent most of my time expanding the characters that constitute content.  I'm concerned that over time I'll have things break as other characters show up. Specifically a few of the

Re: Ideas for parsing this text?

2008-04-24 Thread Eric Wertman
I would discourage you from using printables, since it also includes '[', ']', and '', which are significant to other elements of the parser (but you could create your own variable initialized with printables, and then use replace([,) etc. to strip out the offending characters). I'm

Ideas for parsing this text?

2008-04-23 Thread Eric Wertman
I have a set of files with this kind of content (it's dumped from WebSphere): [propertySet [[resourceProperties [[[description This is a required property. This is an actual database name, and its not the locally catalogued database name. The Universal JDBC Driver does not rely on information

Re: Ideas for parsing this text?

2008-04-23 Thread George Sakkis
On Apr 23, 9:00 pm, Eric Wertman [EMAIL PROTECTED] wrote: I have a set of files with this kind of content (it's dumped from WebSphere): [snipped] I'm trying to figure out the best way to feed it all into dictionaries, without having to know exactly what the contents of the file are.   It

Re: Ideas for parsing this text?

2008-04-23 Thread Paul McGuire
On Apr 23, 8:00 pm, Eric Wertman [EMAIL PROTECTED] wrote: I have a set of files with this kind of content (it's dumped from WebSphere): [propertySet [[resourceProperties [[[description This is a required property. This is an actual database name, and its not the locally catalogued database