Matthew Turk committed 147af3b

Adding in a catch, if no valid files are found in the args, to supply the
string as a glob to TimeSeriesData.from_filenames. This now lets load() get a
glob which then returns a time series object. Closes #403 .

  • Participants
  • Parent commits fa360d6

Comments (0)

Files changed (1)


     valid_file = [os.path.exists(arg) if isinstance(arg, types.StringTypes) 
             else False for arg in args]
     if not any(valid_file):
+        try:
+            from yt.data_objects.time_series import TimeSeriesData
+            ts = TimeSeriesData.from_filenames(*args, **kwargs)
+            return ts
+        except YTOutputNotIdentified:
+            pass
         mylog.error("None of the arguments provided to load() is a valid file")
         mylog.error("Please check that you have used a correct path")
         raise YTOutputNotIdentified(args, kwargs)