Re: Parsing file format to ensure file meets criteria

2009-12-17 Thread seafoid
Hi John, I considered that, but in an attempt to really figure out this supposedly simple language, I figure that I should try and solve this. I will check out the modules for future reference. Thanks, Seafoid :-) -- View this message in context: http://old.nabble.com/Parsing-file-format-to

Re: Parsing file format to ensure file meets criteria

2009-12-17 Thread seafoid
MRAB-2 Thank you for that! Funny how something so simple clarifies a whole lot! I will crack on now! Once again, Cheers and Thanks! -- View this message in context: http://old.nabble.com/Parsing-file-format-to-ensure-file-meets-criteria-tp26837682p26838085.html Sent from the Python

Re: Parsing file format to ensure file meets criteria

2009-12-17 Thread John Bokma
seafoid writes: > Hi folks, > > I am new to python and am having some trouble parsing a file. It really sounds like you need something that generates a parser for you based on a grammar instead of trying to code your own parser. See: http://wiki.python.org/moin/LanguageParsing for an overview o

Re: Parsing file format to ensure file meets criteria

2009-12-17 Thread MRAB
seafoid wrote: Hi folks, I am new to python and am having some trouble parsing a file. I wish to parse a file and ensure that the format meets certain restrictions. The file format is as below (abbreviated): c this is a comment p wcnf 1468 817439 186181 286 32 0 186191 -198 -1098 0 186191 98

Parsing file format to ensure file meets criteria

2009-12-17 Thread seafoid
are irritatingly stupid, please feel free to advise that I r.t.f.m (read the f**king manual). However, thus far the manual has helped me little. Thanking you, Seafoid. -- View this message in context: http://old.nabble.com/Parsing-file-format-to-ensure-file-meets-criteria-tp26837682p2683