Re: Parsing files in python

2012-12-24 Thread Kene Meniru
Chris Angelico wrote: > On Mon, Dec 24, 2012 at 9:32 PM, Kene Meniru > wrote: >> 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 >> wh

Re: Parsing files in python

2012-12-24 Thread Terry Reedy
On 12/23/2012 11:05 PM, Chris Angelico wrote: But other than that, yes, Python's a good choice for this. (I find it amusing how I said "yeah, good idea to make a DSL, I wonder if you can capitalize on Python" and you said "don't make a DSL, maybe you can capitalize on Python" - opposite opening

Re: Parsing files in python

2012-12-24 Thread Chris Angelico
On Mon, Dec 24, 2012 at 9:32 PM, Kene Meniru wrote: > 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

Re: Parsing files in python

2012-12-24 Thread Kene Meniru
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 > wrote: >> Chris Angelico wrote: >>> from povray_macros import * >>> >> >> Am afraid you misunderstood my post. The file

Re: Parsing files in python

2012-12-24 Thread Chris Angelico
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 wrote: > Chris Angelico wrote: >> from povray_macros import * >> > > Am afraid you misunderstood my post. The file format I described is not an > attempt

Re: Parsing files in python

2012-12-23 Thread Chris Angelico
On Mon, Dec 24, 2012 at 12:46 PM, Terry Reedy wrote: >> snapOffset("Closet-S1_r1", "Closet-S2_r3", <0,0,0>) > > > Already legal Python > Not quite. This is the one part that *doesn't* work directly. In POV-Ray, a vector eg is used to represent points, transformations, and sometimes colors. The c

Re: Parsing files in python

2012-12-23 Thread Terry Reedy
On 12/23/2012 12:19 PM, Kene Meniru wrote: Hello: I am writing a program that is made up of a collection of POV-Ray macros. POV-Ray is available at povray.org. It is a ray-tracing program that reads a scene description language (SDL) to create photo-realistic images. At this time my program (for

Re: Parsing files in python

2012-12-23 Thread Chris Angelico
On Mon, Dec 24, 2012 at 4:19 AM, Kene Meniru wrote: > Hello: I am writing a program that is made up of a collection of POV-Ray > macros. POV-Ray is available at povray.org. It is a ray-tracing program that > reads a scene description language (SDL) to create photo-realistic images. At > this ti

Parsing files in python

2012-12-23 Thread Kene Meniru
Hello: I am writing a program that is made up of a collection of POV-Ray macros. POV-Ray is available at povray.org. It is a ray-tracing program that reads a scene description language (SDL) to create photo-realistic images. At this time my program (for modeling building information) is so huge