On Fri, 28 Mar 2008 21:00:18 -0300 "Han-Wen Nienhuys" <[EMAIL PROTECTED]> wrote:
> This is wrong . Are you sure you are running 2.4 ? > set (lowercase) is a builtin type. > > Python 2.4.3 (#2, Oct 6 2006, 07:52:30) > [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> Set() > Traceback (most recent call last): > File "<stdin>", line 1, in ? > NameError: name 'Set' is not defined That's why I added the "from sets import Set" line. Here's the problem I get with the version from GUB: tsubasa:~/tmp gperciva$ python Python 2.4.4 (#1, Jan 31 2008, 02:03:55) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> tsubasa:~/tmp gperciva$ lilypond-book --pdf lybook.lytex lilypond-book (GNU LilyPond) 2.11.43 Reading lybook.lytex... Running latex...This is pdfTeX, Version 3.141592-1.40.3 (Web2C 7.5.6) entering extended mode -snip- No pages of output. Transcript written on tmpuyj7Yk.log. Dissecting... Traceback (most recent call last): File "/Users/gperciva/Apps/LilyPond.app/Contents/Resources/bin/lilypond-book", line 1930, in ? main () File "/Users/gperciva/Apps/LilyPond.app/Contents/Resources/bin/lilypond-book", line 1912, in main chunks = do_file (files[0]) File "/Users/gperciva/Apps/LilyPond.app/Contents/Resources/bin/lilypond-book", line 1821, in do_file do_process_cmd (chunks, input_fullname, global_options) File "/Users/gperciva/Apps/LilyPond.app/Contents/Resources/bin/lilypond-book", line 1657, in do_process_cmd output_files = set(os.listdir(options.lily_output_dir)) NameError: global name 'set' is not defined tsubasa:~/tmp gperciva$ If I apply that patch, it works as expected. If I change line 1657 to Set instead of set (after adding the "from..." line as well), then lilypond-book gives a similar error message, about a different line that involves set(). Even the one-line results = set () produces such a "global name 'set' is not defined" error. However, this works just fine: tsubasa:~ gperciva$ python Python 2.4.4 (#1, Jan 31 2008, 02:03:55) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> foo = set() >>> print foo set([]) >>> tsubasa:~ gperciva$ ... as I said, I don't pretend to understand what's happening. :( Cheers, - Graham _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel