On Thu, Jun 07, 2012 at 07:09:26AM +0200, Federico Bruni wrote: > Il 07/06/2012 02:49, Colin Hall ha scritto: > >It seems to be equipped to run as a program: > > > >lgc$ > >wgethttp://lilykde.googlecode.com/svn/trunk/frescobaldi/python/ly/indent.py > >lgc$ > > I'd rather use the version in the current repository: > wget > https://raw.github.com/wbsoft/frescobaldi/master/frescobaldi_app/indent.py > > >lgc$ python -V > >Python 2.6.5 > >lgc$ > >lgc$ python indent.py -t 2 Heidenroeslein.ly > >Traceback (most recent call last): > > File "indent.py", line 252, in<module> > > startscheme=options.scheme > > File "indent.py", line 107, in indent > > usetabs = '\t' in space or '\n\t' in text > >UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 48: > >ordinal not in range(128) > >lgc$ > > > >I don't have experience with python Unicode support. Is 2.6.5 new enough for > >this to work? > > I get the same in Python 2.7.3. > > I think that the error is explained here: > http://docs.python.org/release/3.0.1/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit > > As a quick solution, you can try to update indent.py to python3: > 2to3 indent.py > > then use: > python3 indent.py -t 2 file.ly > > The error goes away... but I'm not sure that the script actually > works this way: I've tried to set -t 4 (all my ly files have 2 space > indentation), but nothing changes.
Thanks for giving it a shot, Federico. Cheers, Colin. -- Colin Hall _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
