Last change
on this file since 3627 was
3167,
checked in by Henrik Bettermann, 17 years ago
|
'without data' replaced
|
-
Property svn:keywords set to
Id
|
File size:
442 bytes
|
Line | |
---|
1 | ##parameters=key=None |
---|
2 | # $Id: get_csv_names.py 3167 2008-02-15 00:08:01Z henrik $ |
---|
3 | """ |
---|
4 | Return the sessions as an vocabulary |
---|
5 | |
---|
6 | """ |
---|
7 | files = context.waeup_tool.get_csv_filenames() |
---|
8 | if key is None: |
---|
9 | if files: |
---|
10 | l = [(f[:-4],f) for f in files] |
---|
11 | else: |
---|
12 | l = [] |
---|
13 | l.insert(0,('--','pending data only')) |
---|
14 | l.sort(cmp=lambda x,y: cmp(x[0].lower(), y[0].lower())) |
---|
15 | return l |
---|
16 | |
---|
17 | if "%s.csv" % key in files: |
---|
18 | return files[files.index("%s.csv" % key)] |
---|
19 | return ('--','pending data only') |
---|
Note: See
TracBrowser for help on using the repository browser.