From 78ac6f23ef082a754ce04195730e36ac94ae5f9d Mon Sep 17 00:00:00 2001 From: Romain Goffe Date: Sun, 11 Sep 2011 15:30:40 +0200 Subject: [PATCH] Revert "try sorting based on locale preferences" This reverts commit 551fcd3df5309147f40b3e71405d57a4f03db177. --- songbook-makeindex.py | 3 +-- songbook.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/songbook-makeindex.py b/songbook-makeindex.py index 44764424..e2af3e02 100755 --- a/songbook-makeindex.py +++ b/songbook-makeindex.py @@ -13,7 +13,6 @@ import sys import os.path import glob import re -import locale from optparse import OptionParser # Pattern set to ignore latex command in title prefix @@ -60,7 +59,7 @@ class index: def idxBlockToStr(self, letter, entries): str = '\\begin{idxblock}{'+letter+'}'+'\n' - for key in sorted(entries.keys(), cmp=locale.strcoll): + for key in sorted(entries.keys()): str += self.entryToStr(key, entries[key]) str += '\\end{idxblock}'+'\n' return str diff --git a/songbook.py b/songbook.py index 04020464..7e556f4d 100755 --- a/songbook.py +++ b/songbook.py @@ -7,7 +7,6 @@ import os.path import glob import re import json -import locale def matchRegexp(reg, iterable): return [ m.group(1) for m in (reg.match(l) for l in iterable) if m ] @@ -95,7 +94,7 @@ def makeTexFile(sb, output): # output songslist if songs == "all": songs = map(lambda x: x[6:], glob.glob('songs/*/*.sg')) - songs = sorted(songs, cmp=locale.strcoll) + songs.sort() if len(songs) > 0: out.write(formatDefinition('songslist', songslist(songs))) out.write('\\makeatother\n')