[yt-svn] commit/yt: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Tue Dec 4 07:22:35 PST 2012
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/changeset/147af3b13a60/
changeset: 147af3b13a60
branch: yt
user: MatthewTurk
date: 2012-12-03 21:46:19
summary: 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 .
affected #: 1 file
diff -r fa360d6c81c39378a925cc88cb67ac2b44248ba7 -r 147af3b13a60a32ca5ab015faabd5b6978c0a589 yt/convenience.py
--- a/yt/convenience.py
+++ b/yt/convenience.py
@@ -61,6 +61,12 @@
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)
https://bitbucket.org/yt_analysis/yt/changeset/8fc60853e8eb/
changeset: 8fc60853e8eb
branch: yt
user: brittonsmith
date: 2012-12-04 16:22:33
summary: Merged in MatthewTurk/yt (pull request #363)
affected #: 1 file
diff -r 6bc289da0cdeef6a676e5d3cf28a4ca7d961fc4d -r 8fc60853e8eb6bd24242707400a4dfb562f69868 yt/convenience.py
--- a/yt/convenience.py
+++ b/yt/convenience.py
@@ -61,6 +61,12 @@
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)
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list