From: <bao...@us...> - 2006-03-10 10:14:42
|
Revision: 16 Author: baoilleach Date: 2006-03-10 02:14:37 -0800 (Fri, 10 Mar 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=16&view=rev Log Message: ----------- In the hope of minor speedups I: (1) removed newtext in the arguments (not used) (2) removed the brackets in an if statement (unnecessary) (3) removed a float conversion as one of the numbers in the expression is already a float Modified Paths: -------------- trunk/src/cclib/parser/textprogress.py Modified: trunk/src/cclib/parser/textprogress.py =================================================================== --- trunk/src/cclib/parser/textprogress.py 2006-03-10 10:04:34 UTC (rev 15) +++ trunk/src/cclib/parser/textprogress.py 2006-03-10 10:14:37 UTC (rev 16) @@ -13,12 +13,12 @@ self.nstep=float(nstep) self.text=text - def update(self,step,newtext=None): + def update(self,step): - self.progress=int(float(step)/self.nstep*100) + self.progress = int(step/self.nstep*100) #print step,self.nstep - if(self.progress/10==self.oldprogress/10+1): #just went through an interval of ten, ie. from 39 to 41, so update + if self.progress/10==self.oldprogress/10+1: #just went through an interval of ten, ie. from 39 to 41, so update str="[" for i in range(self.progress/10): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |