[Yt-svn] yt-commit r578 - trunk/yt/fido

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Thu Jun 19 22:17:43 PDT 2008


Author: mturk
Date: Thu Jun 19 22:17:43 2008
New Revision: 578
URL: http://yt.spacepope.org/changeset/578

Log:
Minor cosmetic changes.



Modified:
   trunk/yt/fido/OutputCollection.py
   trunk/yt/fido/RunStandalones.py

Modified: trunk/yt/fido/OutputCollection.py
==============================================================================
--- trunk/yt/fido/OutputCollection.py	(original)
+++ trunk/yt/fido/OutputCollection.py	Thu Jun 19 22:17:43 2008
@@ -146,15 +146,15 @@
         return self.output_names.tolist()
 
     def __convert_args(self, args, kwargs, my_dict):
-        newArgs = list(args)[:]
-        newKwargs = {}
+        new_args = list(args)[:]
+        new_kwargs = {}
         for j, arg in enumerate(args):
             if isinstance(arg, types.StringType):
-                newArgs[j] = arg % myDict
+                new_args[j] = arg % myDict
         for key in kwargs.keys():
             if isinstance(kwargs[key], types.StringType):
-                newKwargs[key] = kwargs[key] % myDict
-        return newArgs, newKwargs
+                new_kwargs[key] = kwargs[key] % myDict
+        return new_args, new_kwargs
 
     def run_functions(self, function, args = None, kwargs = None):
         if args is None: args = []

Modified: trunk/yt/fido/RunStandalones.py
==============================================================================
--- trunk/yt/fido/RunStandalones.py	(original)
+++ trunk/yt/fido/RunStandalones.py	Thu Jun 19 22:17:43 2008
@@ -151,10 +151,8 @@
         # First we copy, then we modify the MDS.  Note that we don't need to
         # create a new OC.
         b = bn
-        if b.endswith('/'):
-            b = os.path.basename(b)
-        if b.endswith('.dir'):
-            b = os.path.join(b, b[:-4])
+        if b.endswith('/'): b = os.path.basename(b)
+        if b.endswith('.dir'): b = os.path.join(b, b[:-4])
         #print "Copying %s to %s" % (b, self.opts.new_location)
         newName=copy_outputs(b, self.opts.new_location)
         print newName
@@ -163,13 +161,13 @@
         expr=re.compile("CurrentTimeIdentifier\s*=\s*[0-9]*$",re.M)
         pfContents = open(newName).read()
         newId = time.time()
-        newPf=expr.sub("CurrentTimeIdentifier = %i" % (newId), pfContents)
+        new_pf=expr.sub("CurrentTimeIdentifier = %i" % (newId), pfContents)
         expr=re.compile("MetaDataString\s*=\s*.*$",re.M)
         if self.opts.md == None: self.opts.md = os.path.basename(
                                                  os.path.dirname(
                                                   os.path.abspath(newName)))
-        newPf=expr.sub("MetaDataString      = %s" % (self.opts.md),newPf)
-        open(newName,"w").write(newPf)
+        new_pf=expr.sub("MetaDataString      = %s" % (self.opts.md),new_pf)
+        open(newName,"w").write(new_pf)
 
 class Import(FidoAction):
     description = "Import an existing set of buried outputs"



More information about the yt-svn mailing list