source: TI02-CSML/trunk/csml/API/csmlutils.py @ 1938

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI02-CSML/trunk/csml/API/csmlutils.py@1938
Revision 1938, 281 bytes checked in by domlowe, 13 years ago (diff)

added module to hold utility functions eg listify

Line 
1'''csml utils contains useful  utility functions'''
2
3
4def listify(item):
5    ''' listify checks if an item is a list, if it isn't it puts it inside a list and returns it. Always returns a list object'''
6    if type(item) is list:
7        return item
8    else:
9        return [item]
Note: See TracBrowser for help on using the repository browser.