From: Bernie Innocenti Date: Mon, 13 Oct 2008 21:37:52 +0000 (+0200) Subject: Sort directories X-Git-Tag: v3.0~8^2~4 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=8b1c9ab129dd6bb01fb0675e146394e7ca547f43;p=geekigeeki.git Sort directories --- diff --git a/geekigeeki.py b/geekigeeki.py index d403e78..64333ea 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -265,17 +265,20 @@ def make_index_key(): return '

'+ ' | '.join(links) + '

' def page_list(dir = None, re = word_re): - return filter(re.match, os.listdir(dir or data_dir)) + return sorted(filter(re.match, os.listdir(dir or data_dir))) def send_footer(name, mod_string=None): if globals().get('debug_cgi', False): cgi.print_arguments() cgi.print_form(form) cgi.print_environ() - print '