Skip to content

Commit 5141cd1

Browse files
author
Richard Jones
committed
Support for determining the installed tempaltes
1 parent 555ced2 commit 5141cd1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

roundup/templates/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1+
import os
12

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
212

0 commit comments

Comments
 (0)