Commit b5f64d2d authored by bonnell's avatar bonnell

Change use of 'str' as var name in python scripts

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@29454 18c085ea-50e0-402c-830e-de6fd14e8384
parent 68f99050
......@@ -967,9 +967,9 @@ class MakeMovie(object):
print " -expedite Makes batch system give priority scheduling."
print ""
def Log(self, str):
def Log(self, msg):
if self.log != 0:
self.log.write("%s\n" % str)
self.log.write("%s\n" % msg)
self.log.flush()
###########################################################################
......@@ -986,18 +986,18 @@ class MakeMovie(object):
#
###########################################################################
def Debug(self, level, str):
def Debug(self, level, msg):
if level not in (1,2,3,4,5):
return
debug_level = GetDebugLevel()
if debug_level > 0:
for i in range(level, 6):
if self.debug_real[i-1] != 0:
self.debug_real[i-1].write("%s\n" % str)
self.debug_real[i-1].write("%s\n" % msg)
self.debug_real[i-1].flush()
# Write debug1 to the log also.
if level == 1:
self.Log(str)
self.Log(msg)
###########################################################################
# Method: SendClientProgress
......
......@@ -19,9 +19,9 @@ def GetCreateNodeFiles():
for f in files:
index = string.find(f, ':')
if(index != -1):
str = f[:index]
if(str not in retval):
retval = retval + [str]
astr = f[:index]
if(astr not in retval):
retval = retval + [astr]
return retval
#
......
......@@ -327,15 +327,15 @@ implFile.write("int tesselationCaseStart3D[256][4] = {")
currLineLen = 80 # Enforce start with newline
for caseStart in tesselationStart[:-1]:
str = "{ %d, %d, %d, %d }, " % tuple(caseStart)
if currLineLen + len(str) > 80:
caseStr = "{ %d, %d, %d, %d }, " % tuple(caseStart)
if currLineLen + len(caseStr) > 80:
implFile.write("\n ")
currLineLen = 0
implFile.write(str)
currLineLen += len(str)
str = "{ %d, %d, %d, %d }" % tuple(caseStart)
if currLineLen + len(str) > 80:
implFile.write(caseStr)
currLineLen += len(caseStr)
caseStr = "{ %d, %d, %d, %d }" % tuple(caseStart)
if currLineLen + len(caseStr) > 80:
implFile.write("\n ")
currLineLen = 0
implFile.write(str)
implFile.write(caseStr)
implFile.write("\n};\n")
......@@ -19,9 +19,9 @@ def GetCreateNodeFiles():
for f in files:
index = string.find(f, ':')
if(index != -1):
str = f[:index]
if(str not in retval):
retval = retval + [str]
astr = f[:index]
if(astr not in retval):
retval = retval + [astr]
return retval
#
......
......@@ -19,9 +19,9 @@ def GetCreateNodeFiles():
for f in files:
index = string.find(f, ':')
if(index != -1):
str = f[:index]
if(str not in retval):
retval = retval + [str]
astr = f[:index]
if(astr not in retval):
retval = retval + [astr]
return retval
#
......
......@@ -32,11 +32,11 @@ def GetFullName(headerName, dirName, headers):
return fullName
def IndentedPrint(indent, str):
def IndentedPrint(indent, astr):
indentStr = ""
for i in range(indent):
indentStr = indentStr + " "
indentStr = indentStr + str
indentStr = indentStr + astr
print indentStr
......
......@@ -1268,12 +1268,12 @@ def drawRotatedText(im, x0, y0, chars, scale, angleDegrees, fillColor):
def drawText(im, x0, y0, chars, scale, fillColor):
drawRotatedText(im, x0, y0, chars, scale, 0., fillColor)
def calculateTextWidth(str):
def calculateTextWidth(astr):
width = 0.
for c in str:
for c in astr:
ch = ord(c)
width = width + nice_triangle_spacing[ch]
return width
def calculateTextWidthInPixels(str, im, scale):
return (float(scale) / float(im.size[0])) * calculateTextWidth(str)
def calculateTextWidthInPixels(astr, im, scale):
return (float(scale) / float(im.size[0])) * calculateTextWidth(astr)
......@@ -38,12 +38,12 @@ def commandInPath(command):
lines = f.readlines()
f.close()
# Glue the lines together.
str = ""
astr = ""
for line in lines:
str = str + line
astr = astr + line
# See if the command could not be found
noFail1 = (str.find("no %s in" % command) == -1)
noFail2 = (str.find("Command not found") == -1)
noFail1 = (astr.find("no %s in" % command) == -1)
noFail2 = (astr.find("Command not found") == -1)
return noFail1 and noFail2
###############################################################################
......@@ -512,12 +512,12 @@ def ReadDataFile(filename):
data = []
try:
f = open(filename, "r")
str = "start"
while(str != ''):
str = f.readline()
if(str != ''):
if(str[0] != '#'):
data = data + [str[:-1]]
aline = "start"
while(aline != ''):
aline = f.readline()
if(aline != ''):
if(aline[0] != '#'):
data = data + [aline[:-1]]
except IOError:
print "Could not read from", filename
return data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment