[Python-de] os.walk reihenfolge

Szabo, Patrick (LNG-VIE) patrick.szabo at lexisnexis.at
Do Mär 14 17:09:34 CET 2013


Das sieht gut aus...vielen Dank !



. . . . . . . . . . . . . . . . . . . . . . . . . .
Ing. Patrick Szabo
Developer
LexisNexis
A-1030 Wien, Marxergasse 25

mailto:Patrick.Szabo at lexisnexis.at
Tel.: +43 1 53452 1573
Fax.: +43 1 534 52 146

. . . . . . . . . . . . . . . . . . . . . . . . . .

-----Ursprüngliche Nachricht-----
Von: python-de [mailto:python-de-bounces+patrick.szabo=lexisnexis.at at python.org] Im Auftrag von Christopher Arndt
Gesendet: Donnerstag, 14. März 2013 16:45
An: python-de at python.org
Betreff: Re: [Python-de] os.walk reihenfolge

On 14.03.2013 15:25, Szabo, Patrick (LNG-VIE) wrote:
> Vielen Dank für die Mühe, aber die Filenamen sind leider sehr sehr unterschiedlich.

Was du willst ist anscheinend ein "natural sort" [1]. Hier eine Implementierung dazu aus dem Python Cookbook [2]:

http://dpaste.com/1022826/


Chris


[1]
http://www.codinghorror.com/blog/2007/12/sorting-for-humans-natural-sort-order.html
[2] http://code.activestate.com/recipes/577679-naive-natural-sort/








Mehr Informationen über die Mailingliste python-de