[EMAIL PROTECTED] writes:
> |
> |yup.  It's a bit baroque in some places; 
> 
> I look at it as a matter of perspective.  On one hand using tight
> loops and method references is hard to read at a glance.  On the other
> hand, once the algorithm is understood, it is significantly easier to
> enhance.  So I gave up some readability for flexibility.  We certainly
> could use so code comments.  That might help a bit.

I find  that if `compress' sources in Python, they usually become
*more* readable.

> |and you take an enormous effort to copy in stead of sharing objects.  
> 
> I don't understand this point.

I noticed some

        return string[0:] 

and the separate set/get methods (but that may also be related to your
requester field)
> |>     else:
> |>         inc = ''
> |>         if ( Props.get('dependencies') ):
> |>             dep=' -d'
> |>         else:
> |>             dep=''
> |>         return inc + dep
> |
> |
> |It would be cool if ly2dvi would read the generated .dep file and
> |change .tex to .dvi
> |
> 
> Could you elaborate on this.  


I want to use ly2dvi in a makefile; for this I need dependencies:

LilyPond -d will output

        foo.tex: foo.ly init/a4.ly ....

ly2dvi should change this to

        out/foo.dvi: foo.ly init/a4.ly  ....

> 
> |I hacked a bit to make it work on unix, results attached.  Could you
> |use tabs (indent 8) for editing?
> 
> I am flexible, but we may experience excessive line wrapping.  I will
> however adhere to any standard you think is reasonable.

You can resize  your window.  80 is not a holy number.

> 
> |More remarks:
> |
> |* requester is way too baroque
> 
> To reiterate this allows us to settle in on a initialization
> precedence without having to do major flow changes.  The way the flow
> is presently rcfile, getopt, texfile so you can not simply override as
> you go.  The same code in ly2dvi.sh is very hard to read, because you
> want to override the texfile settings with the command line switches,
> but the switches are read first.  I actually was trying to improve the
> approach, but apparently I failed miserably.

You can also read options into  a simple dictionary and then assign


        for d in [dict1, dict2, dict3]:
                for k in keys(d):
                        properties[k] = d[k]

Then the order can be changed easily by modifying the order in the list.

-- 

Han-Wen Nienhuys, [EMAIL PROTECTED] ** GNU LilyPond - The Music Typesetter 
      http://www.cs.uu.nl/people/hanwen/lilypond/index.html 

Reply via email to