Mercurial > hg > nsaunier > traffic-intelligence
diff python/utils.py @ 46:b5d007612e16
added filename util
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Fri, 06 Aug 2010 19:45:47 -0400 |
| parents | 74d2de078baf |
| children | 8aed225f71d8 |
line wrap: on
line diff
--- a/python/utils.py Fri Aug 06 01:09:44 2010 -0400 +++ b/python/utils.py Fri Aug 06 19:45:47 2010 -0400 @@ -161,6 +161,10 @@ else: return filename +def cleanFilename(s): + 'cleans filenames obtained when contatenating figure characteristics' + return s.replace(' ','-').replace('.','') + def listfiles(dirname, extension, remove = False): '''Returns the list of files with the extension in the directory dirname If remove is True, the filenames are stripped from the extension'''
