Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8819/debugger
Modified Files:
debugger.py
Log Message:
Replace use of string module with string methods
Index: debugger.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger/debugger.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** debugger.py 20 Feb 2008 22:35:45 -0000 1.16
--- debugger.py 9 Aug 2008 16:47:07 -0000 1.17
***************
*** 256,260 ****
key = msg[2]
# If someone starts typing, they probably are trying to edit the text!
! if chr(key) in string.uppercase:
self.EditSelected()
return 0
--- 256,260 ----
key = msg[2]
# If someone starts typing, they probably are trying to edit the text!
! if chr(key) in string.ascii_uppercase:
self.EditSelected()
return 0
***************
*** 308,312 ****
for bp in bplist:
if id(bp)==item_id:
! if string.lower(string.strip(text))=="none":
text = None
bp.cond = text
--- 308,312 ----
for bp in bplist:
if id(bp)==item_id:
! if text.strip().lower()=="none":
text = None
bp.cond = text
***************
*** 347,351 ****
def CreateWindow(self, parent):
DebuggerListViewWindow.CreateWindow(self, parent)
! items = string.split(win32ui.GetProfileVal("Debugger Windows\\" + self.title, "Items", ""), "\t")
index = -1
for item in items:
--- 347,351 ----
def CreateWindow(self, parent):
DebuggerListViewWindow.CreateWindow(self, parent)
! items = win32ui.GetProfileVal("Debugger Windows\\" + self.title, "Items", "").split("\t")
index = -1
for item in items:
***************
*** 358,362 ****
for i in range(self.GetItemCount()-1):
items.append(self.GetItemText(i,0))
! win32ui.WriteProfileVal("Debugger Windows\\" + self.title, "Items", string.join(items,"\t"))
return 1
--- 358,362 ----
for i in range(self.GetItemCount()-1):
items.append(self.GetItemText(i,0))
! win32ui.WriteProfileVal("Debugger Windows\\" + self.title, "Items", "\t".join(items))
return 1
***************
*** 399,403 ****
except:
t, v, tb = sys.exc_info()
! val = string.strip(traceback.format_exception_only(t, v)[0])
tb = None # prevent a cycle.
self.SetItemText(i, 1, val)
--- 399,403 ----
except:
t, v, tb = sys.exc_info()
! val = traceback.format_exception_only(t, v)[0].strip()
tb = None # prevent a cycle.
self.SetItemText(i, 1, val)
***************
*** 536,540 ****
self.close()
def canonic(self, fname):
! return string.lower(os.path.abspath(fname))
def reset(self):
debugger_parent.reset(self)
--- 536,540 ----
self.close()
def canonic(self, fname):
! return os.path.abspath(fname).lower()
def reset(self):
debugger_parent.reset(self)
***************
*** 950,954 ****
import linecache
line = linecache.getline(filename, lineno)
! print "%s(%d): %s" % (os.path.basename(filename), lineno, string.expandtabs(line[:-1],4))
return 0
--- 950,954 ----
import linecache
line = linecache.getline(filename, lineno)
! print "%s(%d): %s" % (os.path.basename(filename), lineno, line[:-1].expandtabs(4))
return 0
|