source: WAeUP_SRP/trunk/skins/waeup_default/get_csv_names.py @ 3687

Last change on this file since 3687 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"""
4Return the sessions as an vocabulary
5
6"""
7files = context.waeup_tool.get_csv_filenames()
8if 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
17if "%s.csv" % key in files:
18    return files[files.index("%s.csv" % key)]
19return ('--','pending data only')
Note: See TracBrowser for help on using the repository browser.