[Yt-svn] commit/yt: MatthewTurk: Adding progress bar for grid instantiation

Bitbucket commits-noreply at bitbucket.org
Thu Mar 10 12:34:20 PST 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/63b6bf23409b/
changeset:   r3808:63b6bf23409b
branch:      yt
user:        MatthewTurk
date:        2011-03-10 21:33:13
summary:     Adding progress bar for grid instantiation
affected #:  1 file (116 bytes)

--- a/yt/frontends/enzo/data_structures.py	Thu Mar 10 11:56:50 2011 -0800
+++ b/yt/frontends/enzo/data_structures.py	Thu Mar 10 12:33:13 2011 -0800
@@ -226,7 +226,9 @@
         si, ei, LE, RE, fn, np = [], [], [], [], [], []
         all = [si, ei, LE, RE, fn]
         f.readline() # Blank at top
+        pbar = get_pbar("Parsing Hierarchy", self.num_grids)
         for grid_id in xrange(self.num_grids):
+            pbar.update(grid_id)
             # We will unroll this list
             si.append(_next_token_line("GridStartIndex", f))
             ei.append(_next_token_line("GridEndIndex", f))
@@ -246,6 +248,7 @@
                     continue
                 params = line.split()
                 line = f.readline()
+        pbar.finish()
         self._fill_arrays(ei, si, LE, RE, np)
         self.grids = na.array(self.grids, dtype='object')
         self.filenames = fn

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