[Yt-svn] yt-commit r579 - trunk/yt
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Thu Jun 19 22:26:35 PDT 2008
Author: mturk
Date: Thu Jun 19 22:26:35 2008
New Revision: 579
URL: http://yt.spacepope.org/changeset/579
Log:
Added an extremely simply convenience module.
from yt.mods import *
now gives you all three modules you could conceivably want to use on the
command line. This is also a quicker way to set up scripts, as you can do:
{{{
#!python
from yt.mods import *
pf = get_pf()
}}}
and then you can do stuff!
Added:
trunk/yt/mods.py
Added: trunk/yt/mods.py
==============================================================================
--- (empty file)
+++ trunk/yt/mods.py Thu Jun 19 22:26:35 2008
@@ -0,0 +1,35 @@
+"""
+Very simple convenience function for importing all the modules, setting up
+the namespace and getting the last argument on the command line.
+
+ at author: U{Matthew Turk<http://www.stanford.edu/~mturk/>}
+ at organization: U{KIPAC<http://www-group.slac.stanford.edu/KIPAC/>}
+ at contact: U{mturk at slac.stanford.edu<mailto:mturk at slac.stanford.edu>}
+ at license:
+ Copyright (C) 2008 Matthew Turk. All Rights Reserved.
+
+ This file is part of yt.
+
+ yt is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+
+
+import yt.lagos as lagos
+import yt.raven as raven
+import yt.fido as fido
+import numpy as na
+import sys
+
+def get_pf():
+ return lagos.EnzoStaticOutput(sys.argv[-1])
More information about the yt-svn
mailing list