source: WAeUP_SRP/base/skins/waeup_default/get_csv_names.py @ 3163

Last change on this file since 3163 was 3162, checked in by joachim, 17 years ago

fix for #477

  • Property svn:keywords set to Id
File size: 440 bytes
Line 
1##parameters=key=None
2# $Id: get_csv_names.py 3162 2008-02-14 08:04:50Z joachim $
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,('--','without new data'))
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 ('--','without new data')
Note: See TracBrowser for help on using the repository browser.