[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[OpenTAL-checkins] opental/OpenTAL/Static path.py
From: |
Fernando Lalo Martins |
Subject: |
[OpenTAL-checkins] opental/OpenTAL/Static path.py |
Date: |
Wed, 05 Feb 2003 09:48:52 -0500 |
CVSROOT: /cvsroot/opental
Module name: opental
Changes by: Fernando Lalo Martins <address@hidden> 03/02/05 09:48:52
Modified files:
OpenTAL/Static : path.py
Log message:
speeding up listdir with fnmatch patterns, after suggestion from the
author of upstream path.py
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/opental/opental/OpenTAL/Static/path.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: opental/OpenTAL/Static/path.py
diff -u opental/OpenTAL/Static/path.py:1.2 opental/OpenTAL/Static/path.py:1.3
--- opental/OpenTAL/Static/path.py:1.2 Tue Feb 4 21:49:35 2003
+++ opental/OpenTAL/Static/path.py Wed Feb 5 09:48:51 2003
@@ -304,8 +304,8 @@
if pattern is None:
return [self / child for child in os.listdir(self)]
else:
- return [self / child for child in os.listdir(self)
- if fnmatch.fnmatch(child, pattern)]
+ return [self / child for child in
+ fnmatch.filter(os.listdir(self), pattern)]
def dirs(self):
return [p for p in self if p.isdir()]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [OpenTAL-checkins] opental/OpenTAL/Static path.py,
Fernando Lalo Martins <=