Re: Parsing files in python

Discussion in 'Python' started by Chris Angelico, Dec 24, 2012.

  1. 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 <x, y, z> is used to represent points,
    transformations, and sometimes colors. The closest Python equivalent
    is the tuple, but that requires that the brackets be changed:

    snapOffset("Closet-S1_r1", "Closet-S2_r3", (0,0,0))

    It would also require some smart footwork at the export end,
    recognizing that a tuple needs to be output with angle brackets.

    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 argument, same conclusion and
    recommendation.)

    ChrisA
    Chris Angelico, Dec 24, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. GIMME
    Replies:
    2
    Views:
    863
    GIMME
    Feb 11, 2004
  2. Naren
    Replies:
    0
    Views:
    567
    Naren
    May 11, 2004
  3. Christopher Diggins
    Replies:
    0
    Views:
    597
    Christopher Diggins
    Jul 9, 2007
  4. Christopher Diggins
    Replies:
    0
    Views:
    422
    Christopher Diggins
    Jul 9, 2007
  5. John Levine
    Replies:
    0
    Views:
    715
    John Levine
    Feb 2, 2012
Loading...

Share This Page