comparison python/utils.py @ 739:25e78d756823 dev

minor change
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Thu, 20 Aug 2015 15:30:19 -0400
parents fb60b54e1041
children 5b91b8d97cf3
comparison
equal deleted inserted replaced
738:2472b4d59aea 739:25e78d756823
878 else: 878 else:
879 return filename 879 return filename
880 880
881 def cleanFilename(s): 881 def cleanFilename(s):
882 'cleans filenames obtained when contatenating figure characteristics' 882 'cleans filenames obtained when contatenating figure characteristics'
883 return s.replace(' ','-').replace('.','').replace('/','-') 883 return s.replace(' ','-').replace('.','').replace('/','-').replace(',','')
884 884
885 def listfiles(dirname, extension, remove = False): 885 def listfiles(dirname, extension, remove = False):
886 '''Returns the list of files with the extension in the directory dirname 886 '''Returns the list of files with the extension in the directory dirname
887 If remove is True, the filenames are stripped from the extension''' 887 If remove is True, the filenames are stripped from the extension'''
888 from os import listdir 888 from os import listdir