Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #35451
| From | Kene Meniru <Kene.Meniru@illom.org> |
|---|---|
| Subject | Re: Parsing files in python |
| Followup-To | gmane.comp.python.general |
| Date | 2012-12-24 05:32 -0500 |
| Organization | illom.org |
| References | <20121223171955.GB32535@ifeobi.illom.net> <CAPTjJmrWAZbb-rmxyCfc3RerK75s4ar0RY2ZCuy5o6PBOVMm6w@mail.gmail.com> <50d82440.d441340a.3779.ffffe491@mx.google.com> <CAPTjJmqmxD383n34AotdzAm7P-Jq8j+eHtxNSzCPih0-_VgDsg@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1249.1356345894.29569.python-list@python.org> (permalink) |
Followups directed to: gmane.comp.python.general
Chris Angelico wrote: > I'm hoping you meant for that to be public; if not, my apologies for > forwarding a private message. > > On Mon, Dec 24, 2012 at 8:45 PM, Kene Meniru <kene.meniru@illom.org> > wrote: >> Chris Angelico wrote: >>> from povray_macros import * >>> >> >> Am afraid you misunderstood my post. The file format I described is not >> an attempt to re-create or modify a python environment. I do not wish to >> be able to "import" python macros but other text files similar to the one >> I described. > > Yep. There are two possibilities: Either you create a program that > reads in a file of format you invent, or you make a set of Python > functions and classes that mean that the format is actually a Python > script. Instead of writing a file parser, you use Python's, and the > program you write is actually a module rather than a top-level > application. > Actually, I think I mean what you are saying. Let me repeat what I understand maybe I am understanding it wrong. You are saying I can create a python module that can parse this file format without using a system like python-ply? I know how to parse strings using python but considering that text files that describe a whole building may be quite large I thought perhaps the re module may not be adequate. > Producing output on stdout is one of the easiest and most standard > ways to export content. > > ChrisA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Parsing files in python Kene Meniru <Kene.Meniru@illom.org> - 2012-12-24 05:32 -0500
csiph-web