diff options
author | Greg Noel <GregNoel@tigris.org> | 2010-04-24 22:25:56 +0000 |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2010-04-24 22:25:56 +0000 |
commit | 176e5aa1f01a461939f5bd72ffd0dd8db9a175da (patch) | |
tree | bbdcd3f7da00dc5fcfa712bfaf148f392ac12fda /bin | |
parent | 8d23e18390f93d99ea18c8d2d7a38a1dd0c79dd8 (diff) | |
download | scons-176e5aa1f01a461939f5bd72ffd0dd8db9a175da.tar.gz |
Convert to Python 3.x division rules.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/calibrate.py | 3 | ||||
-rw-r--r-- | bin/linecount.py | 1 | ||||
-rwxr-xr-x | bin/svn-bisect.py | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/bin/calibrate.py b/bin/calibrate.py index c5d45ce6..f377869e 100644 --- a/bin/calibrate.py +++ b/bin/calibrate.py @@ -20,6 +20,7 @@ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +from __future__ import division import optparse import os @@ -71,7 +72,7 @@ def main(argv=None): good = 0 for v in vm.groups(): var, value = v.split('=', 1) - value = int((int(value) * opts.max) / elapsed) + value = int((int(value) * opts.max) // elapsed) os.environ[var] = str(value) run += 1 diff --git a/bin/linecount.py b/bin/linecount.py index 7dd4c20c..6f49dcad 100644 --- a/bin/linecount.py +++ b/bin/linecount.py @@ -21,6 +21,7 @@ # in each category, the number of non-blank lines, and the number of # non-comment lines. The last figure (non-comment) lines is the most # interesting one for most purposes. +from __future__ import division __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" diff --git a/bin/svn-bisect.py b/bin/svn-bisect.py index e9ebcf89..77bda58f 100755 --- a/bin/svn-bisect.py +++ b/bin/svn-bisect.py @@ -1,5 +1,6 @@ #!/usr/bin/env python # -*- Python -*- +from __future__ import division import sys from math import log, ceil @@ -52,7 +53,7 @@ msg = "****** max %d revisions to test (bug bracketed by [%d,%d])" while upper-lower > 1: print msg % (ceil(log(upper-lower,2)), lower, upper) - mid = int((lower + upper)/2) + mid = (lower + upper)//2 midfails = testfail(mid) if midfails == lowerfails: lower = mid |