Mercurial > p > roundup > code
comparison roundup/templates/__init__.py @ 146:da7b97149caa
Support for determining the installed tempaltes
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 30 Jul 2001 01:28:17 +0000 |
| parents | 5e71aaa87e5b |
| children | d45384bc6420 |
comparison
equal
deleted
inserted
replaced
| 145:97b552db1e0b | 146:da7b97149caa |
|---|---|
| 1 import os | |
| 1 | 2 |
| 3 def listTemplates(): | |
| 4 t_dir = os.path.split(__file__)[0] | |
| 5 l = [] | |
| 6 for entry in os.listdir(t_dir): | |
| 7 # this isn't strictly necessary - the CVS dir won't be distributed | |
| 8 if entry == 'CVS': continue | |
| 9 if os.path.isdir(os.path.join(t_dir, entry)): | |
| 10 l.append(entry) | |
| 11 return l | |
| 2 | 12 |
