Update misc.py
Added a listFiles helper method, useful for listing models in the current directory.
@@ -33,6 +33,16 @@ def readFromFile(filePath):
return string
+def listFiles (wildcardstr):
+ """ List the files names in the current directory using the wildcard argument
+
+ eg te.listFiles ('*.xml')
+ :param wildcardstr: WIld card using during the file search
+ :returns: list of file names that match the wildcard
+ """
+ import glob
+ return glob.glob (wildcardstr)
+
# ---------------------------------------------------------------------
# Deprecated warning
# ---------------------------------------------------------------------
