lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reminder: input/lsr/* generated automagically


From: Han-Wen Nienhuys
Subject: Re: reminder: input/lsr/* generated automagically
Date: Wed, 11 Apr 2007 23:34:43 -0300

some comments

+def copyWithWarning(src, dest):


naming: copy_with_warning

+       readFile = open(src, 'r')

'r' : superfluous

+       readFileLines = readFile.readlines()

+       readFile.close()

superfluous. Happens automatically if it goes out of scope.

+       writeFile = open(dest, 'w')

+       writeFile.write('%%  Do not edit this file; it is
auto-generated from LSR!\n')

+       for line in readFileLines:

+               writeFile.write(line)

+       writeFile.close()

shorter :

 msg = '%% .. '
 open (dest, 'w').write (msg + open (src).read())

2007/4/11, Graham Percival <address@hidden>:

Ok, done.  I was hoping that the README in that directory would be
enough, but it's easy to add such a warning automatically.

--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]