Commit b85ae835 authored by Romain Baptiste Dominique Albert's avatar Romain Baptiste Dominique Albert
Browse files

Make it possible to look for file with specific extension when loading a...

Make it possible to look for file with specific extension when loading a folder. Notice that this allows to use this function to be used with the new data_module file format.
parent 7b5db6dd
......@@ -1284,7 +1284,9 @@ def font_list():
import matplotlib.font_manager as fm
return [f.name for f in fm.fontManager.ttflist]
def load_datamodules_in_folder(path='.',word_search=None,parameters=[],return_filelist=False, sort = True):
def load_datamodules_in_folder(path='.',word_search=None,parameters=[],
return_filelist=False, sort = True,
extension='.dm'):
"""This function opens all the datamodules in a folder and returns them in
a list
......@@ -1330,7 +1332,7 @@ def load_datamodules_in_folder(path='.',word_search=None,parameters=[],return_fi
path = '.'
#return path
filelist= glob.glob(path+'/*.dm')
filelist= glob.glob(path+'/*'+extension)
#return filelist
dmlist = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment