[Yt-svn] yt-commit r1381 - branches/yt-1.5/yt trunk/yt

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Sat Jul 18 20:35:09 PDT 2009


Author: mturk
Date: Sat Jul 18 20:35:07 2009
New Revision: 1381
URL: http://yt.spacepope.org/changeset/1381

Log:
Make the directory we're going to save frames in, if it does not exist already.



Modified:
   branches/yt-1.5/yt/commands.py
   trunk/yt/commands.py

Modified: branches/yt-1.5/yt/commands.py
==============================================================================
--- branches/yt-1.5/yt/commands.py	(original)
+++ branches/yt-1.5/yt/commands.py	Sat Jul 18 20:35:07 2009
@@ -336,6 +336,7 @@
         pc.set_width(opts.width, opts.unit)
         pc.set_cmap(opts.cmap)
         if opts.zlim: pc.set_zlim(*opts.zlim)
+        if not os.path.isdir(opts.output): os.makedirs(opts.output)
         pc.save(os.path.join(opts.output,"%s" % (pf)))
 
     def do_vtk(self, subcmd, opts):

Modified: trunk/yt/commands.py
==============================================================================
--- trunk/yt/commands.py	(original)
+++ trunk/yt/commands.py	Sat Jul 18 20:35:07 2009
@@ -336,6 +336,7 @@
         pc.set_width(opts.width, opts.unit)
         pc.set_cmap(opts.cmap)
         if opts.zlim: pc.set_zlim(*opts.zlim)
+        if not os.path.isdir(opts.output): os.makedirs(opts.output)
         pc.save(os.path.join(opts.output,"%s" % (pf)))
 
     def do_vtk(self, subcmd, opts):



More information about the yt-svn mailing list