Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8819/framework
Modified Files:
app.py bitmap.py cmdline.py help.py interact.py intpyapp.py
mdi_pychecker.py scriptutils.py sgrepmdi.py stdin.py winout.py
Log Message:
Replace use of string module with string methods
Index: intpyapp.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/intpyapp.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** intpyapp.py 24 May 2007 13:48:37 -0000 1.10
--- intpyapp.py 9 Aug 2008 16:47:07 -0000 1.11
***************
*** 233,237 ****
if args[0] and args[0][0]!='/':
argStart = 0
! argType = string.lower(win32ui.GetProfileVal("Python","Default Arg Type","/edit"))
else:
argStart = 1
--- 233,237 ----
if args[0] and args[0][0]!='/':
argStart = 0
! argType = win32ui.GetProfileVal("Python","Default Arg Type","/edit").lower()
else:
argStart = 1
***************
*** 248,261 ****
elif argType=="/rundlg":
if dde:
! dde.Exec("import scriptutils;scriptutils.RunScript('%s', '%s', 1)" % (args[argStart], string.join(args[argStart+1:])))
else:
import scriptutils
! scriptutils.RunScript(args[argStart], string.join(args[argStart+1:]))
elif argType=="/run":
if dde:
! dde.Exec("import scriptutils;scriptutils.RunScript('%s', '%s', 0)" % (args[argStart], string.join(args[argStart+1:])))
else:
import scriptutils
! scriptutils.RunScript(args[argStart], string.join(args[argStart+1:]), 0)
elif argType=="/app":
raise RuntimeError, "/app only supported for new instances of Pythonwin.exe"
--- 248,261 ----
elif argType=="/rundlg":
if dde:
! dde.Exec("import scriptutils;scriptutils.RunScript('%s', '%s', 1)" % (args[argStart], ' '.join(args[argStart+1:])))
else:
import scriptutils
! scriptutils.RunScript(args[argStart], ' '.join(args[argStart+1:]))
elif argType=="/run":
if dde:
! dde.Exec("import scriptutils;scriptutils.RunScript('%s', '%s', 0)" % (args[argStart], ' '.join(args[argStart+1:])))
else:
import scriptutils
! scriptutils.RunScript(args[argStart], ' '.join(args[argStart+1:]), 0)
elif argType=="/app":
raise RuntimeError, "/app only supported for new instances of Pythonwin.exe"
***************
*** 289,293 ****
def DoLoadModules(self, moduleNames): # ", sep string of module names.
if not moduleNames: return
! modules = string.splitfields(moduleNames,",")
for module in modules:
try:
--- 289,293 ----
def DoLoadModules(self, moduleNames): # ", sep string of module names.
if not moduleNames: return
! modules = moduleNames.split(",")
for module in modules:
try:
***************
*** 364,370 ****
lastLocateFileName = name
# if ".py" supplied, rip it off!
! if string.lower(lastLocateFileName[-3:])=='.py':
lastLocateFileName = lastLocateFileName[:-3]
! lastLocateFileName = string.translate(lastLocateFileName, string.maketrans(".","\\"))
newName = scriptutils.LocatePythonFile(lastLocateFileName)
if newName is None:
--- 364,371 ----
lastLocateFileName = name
# if ".py" supplied, rip it off!
! # should also check for .pys and .pyw
! if lastLocateFileName[-3:].lower()=='.py':
lastLocateFileName = lastLocateFileName[:-3]
! lastLocateFileName = lastLocateFileName.replace(".","\\")
newName = scriptutils.LocatePythonFile(lastLocateFileName)
if newName is None:
Index: mdi_pychecker.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/mdi_pychecker.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mdi_pychecker.py 24 May 2007 13:48:37 -0000 1.1
--- mdi_pychecker.py 9 Aug 2008 16:47:07 -0000 1.2
***************
*** 52,60 ****
class dirpath:
def __init__(self, str, recurse=0):
! dp = string.split(str, ';')
dirs = {}
for d in dp:
if os.path.isdir(d):
! d = string.lower(d)
if not dirs.has_key(d):
dirs[d] = None
--- 52,60 ----
class dirpath:
def __init__(self, str, recurse=0):
! dp = str.split(';')
dirs = {}
for d in dp:
if os.path.isdir(d):
! d = d.lower()
if not dirs.has_key(d):
dirs[d] = None
***************
*** 62,66 ****
subdirs = getsubdirs(d)
for sd in subdirs:
! sd = string.lower(sd)
if not dirs.has_key(sd):
dirs[sd] = None
--- 62,66 ----
subdirs = getsubdirs(d)
for sd in subdirs:
! sd = sd.lower()
if not dirs.has_key(sd):
dirs[sd] = None
***************
*** 72,76 ****
x = dirpath(os.environ[d])
elif d[:5] == 'HKEY_':
! keystr = string.split(d,'\\')
try:
root = eval('win32con.'+keystr[0])
--- 72,76 ----
x = dirpath(os.environ[d])
elif d[:5] == 'HKEY_':
! keystr = d.split('\\')
try:
root = eval('win32con.'+keystr[0])
***************
*** 78,82 ****
win32ui.MessageBox("Can't interpret registry key name '%s'" % keystr[0])
try:
! subkey = string.join(keystr[1:], '\\')
val = win32api.RegQueryValue(root, subkey)
if val:
--- 78,82 ----
win32ui.MessageBox("Can't interpret registry key name '%s'" % keystr[0])
try:
! subkey = '\\'.join(keystr[1:])
val = win32api.RegQueryValue(root, subkey)
if val:
***************
*** 95,99 ****
subdirs = getsubdirs(xd)
for sd in subdirs:
! sd = string.lower(sd)
if not dirs.has_key(sd):
dirs[sd] = None
--- 95,99 ----
subdirs = getsubdirs(xd)
for sd in subdirs:
! sd = sd.lower()
if not dirs.has_key(sd):
dirs[sd] = None
***************
*** 147,151 ****
doc = self.FindOpenDocument(fileName)
if doc: return doc
! ext = string.lower(os.path.splitext(fileName)[1])
if ext =='.pychecker':
return win32ui.CDocTemplate_Confidence_yesAttemptNative
--- 147,151 ----
doc = self.FindOpenDocument(fileName)
if doc: return doc
! ext = os.path.splitext(fileName)[1].lower()
if ext =='.pychecker':
return win32ui.CDocTemplate_Confidence_yesAttemptNative
***************
*** 201,205 ****
if paramstr is None:
paramstr = win32ui.GetProfileVal("Pychecker", "Params", '\t\t\t1\t0\t0')
! params = string.split(paramstr, '\t')
if len(params) < 3:
params = params + ['']*(3-len(params))
--- 201,205 ----
if paramstr is None:
paramstr = win32ui.GetProfileVal("Pychecker", "Params", '\t\t\t1\t0\t0')
! params = paramstr.split('\t')
if len(params) < 3:
params = params + ['']*(3-len(params))
***************
*** 251,255 ****
self.GetFirstView().Append('# Files '+self.filpattern+'\n')
self.GetFirstView().Append('# Options '+self.greppattern+'\n')
! self.fplist = string.split(self.filpattern,';')
self.GetFirstView().Append('# Running... ( double click on result lines in order to jump to the source code ) \n')
win32ui.SetStatusText("Pychecker running. Please wait...", 0)
--- 251,255 ----
self.GetFirstView().Append('# Files '+self.filpattern+'\n')
self.GetFirstView().Append('# Options '+self.greppattern+'\n')
! self.fplist = self.filpattern.split(';')
self.GetFirstView().Append('# Running... ( double click on result lines in order to jump to the source code ) \n')
win32ui.SetStatusText("Pychecker running. Please wait...", 0)
***************
*** 395,399 ****
if regexGrepResult:
fname = regexGrepResult.group(1)
! line = string.atoi(regexGrepResult.group(2))
scriptutils.JumpToDocument(fname, line)
return 0 # dont pass on
--- 395,399 ----
if regexGrepResult:
fname = regexGrepResult.group(1)
! line = int(regexGrepResult.group(2))
scriptutils.JumpToDocument(fname, line)
return 0 # dont pass on
***************
*** 409,413 ****
if regexGrepResult:
self.fnm = regexGrepResult.group(1)
! self.lnnum = string.atoi(regexGrepResult.group(2))
menu.AppendMenu(flags, ID_OPEN_FILE, "&Open "+self.fnm)
menu.AppendMenu(flags, ID_ADDCOMMENT, "&Add to source: Comment Tag/#$pycheck_no ..")
--- 409,413 ----
if regexGrepResult:
self.fnm = regexGrepResult.group(1)
! self.lnnum = int(regexGrepResult.group(2))
menu.AppendMenu(flags, ID_OPEN_FILE, "&Open "+self.fnm)
menu.AppendMenu(flags, ID_ADDCOMMENT, "&Add to source: Comment Tag/#$pycheck_no ..")
***************
*** 444,448 ****
##import pywin.debugger;pywin.debugger.set_trace()
fname = m.group(1)
! line = string.atoi(m.group(2))
view = scriptutils.JumpToDocument(fname,line)
pos=view.LineIndex(line)-1
--- 444,448 ----
##import pywin.debugger;pywin.debugger.set_trace()
fname = m.group(1)
! line = int(m.group(2))
view = scriptutils.JumpToDocument(fname,line)
pos=view.LineIndex(line)-1
***************
*** 465,469 ****
#hope you have an editor that implements GotoLine()!
try:
! vw.GotoLine(string.atoi(self.lnnum))
except:
pass
--- 465,469 ----
#hope you have an editor that implements GotoLine()!
try:
! vw.GotoLine(int(self.lnnum))
except:
pass
***************
*** 472,478 ****
def OnCmdThe(self, cmd, code):
curparamsstr = self.GetDocument().GetParams()
! params = string.split(curparamsstr,'\t')
params[2] = self.sel
! greptemplate.setParams(string.join(params,'\t'))
greptemplate.OpenDocumentFile()
return 0
--- 472,478 ----
def OnCmdThe(self, cmd, code):
curparamsstr = self.GetDocument().GetParams()
! params = curparamsstr.split('\t')
params[2] = self.sel
! greptemplate.setParams('\t'.join(params))
greptemplate.OpenDocumentFile()
return 0
***************
*** 546,553 ****
items = []
for secitem in secitems:
! items.append(string.split(secitem,'=')[1])
dlg = TheParamsDialog(items)
if dlg.DoModal() == win32con.IDOK:
! itemstr = string.join(dlg.getItems(),';')
self._obj_.data[key] = itemstr
#update the ini file with dlg.getNew()
--- 546,553 ----
items = []
for secitem in secitems:
! items.append(secitem.split('=')[1])
dlg = TheParamsDialog(items)
if dlg.DoModal() == win32con.IDOK:
! itemstr = ';'.join(dlg.getItems())
self._obj_.data[key] = itemstr
#update the ini file with dlg.getNew()
Index: stdin.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/stdin.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** stdin.py 15 Apr 2001 13:14:43 -0000 1.2
--- stdin.py 9 Aug 2008 16:47:07 -0000 1.3
***************
*** 70,74 ****
if '\n' in self.buffer[:maximum_result_size]:
! result_size = string.find(self.buffer, '\n', 0, maximum_result_size) + 1
assert(result_size > 0)
else:
--- 70,74 ----
if '\n' in self.buffer[:maximum_result_size]:
! result_size = self.buffer.find('\n', 0, maximum_result_size) + 1
assert(result_size > 0)
else:
***************
*** 155,159 ****
end_of_line_pos = len(test_input)
else:
! end_of_line_pos = string.find(test_input, '\n')
result = test_input[:end_of_line_pos]
test_input = test_input[end_of_line_pos + 1:]
--- 155,159 ----
end_of_line_pos = len(test_input)
else:
! end_of_line_pos = test_input.find('\n')
result = test_input[:end_of_line_pos]
test_input = test_input[end_of_line_pos + 1:]
Index: interact.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/interact.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** interact.py 19 Jun 2008 02:08:57 -0000 1.16
--- interact.py 9 Aug 2008 16:47:07 -0000 1.17
***************
*** 332,336 ****
terms = (["\n" + sys.ps2] * (len(bufLines)-1)) + ['']
for bufLine, term in map(None, bufLines, terms):
! if string.strip(bufLine):
self.write( bufLine + term )
self.flush()
--- 332,336 ----
terms = (["\n" + sys.ps2] * (len(bufLines)-1)) + ['']
for bufLine, term in map(None, bufLines, terms):
! if bufLine.strip():
self.write( bufLine + term )
self.flush()
***************
*** 473,477 ****
self.SetSel(-2)
self.ReplaceSel("\n")
! source = string.join(lines, '\n')
while source and source[-1] in '\t ':
source = source[:-1]
--- 473,477 ----
self.SetSel(-2)
self.ReplaceSel("\n")
! source = '\n'.join(lines)
while source and source[-1] in '\t ':
source = source[:-1]
Index: cmdline.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/cmdline.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** cmdline.py 5 May 2000 13:55:22 -0000 1.2
--- cmdline.py 9 Aug 2008 16:47:07 -0000 1.3
***************
*** 19,23 ****
pos=pos+1
try:
! endPos = string.index(str, '"', pos)-1
nextPos = endPos+2
except ValueError:
--- 19,23 ----
pos=pos+1
try:
! endPos = str.index('"', pos)-1
nextPos = endPos+2
except ValueError:
***************
*** 28,32 ****
while endPos<length and not str[endPos] in string.whitespace: endPos = endPos+1
nextPos=endPos+1
! ret.append(string.strip(str[pos:endPos+1]))
pos = nextPos
return ret
--- 28,32 ----
while endPos<length and not str[endPos] in string.whitespace: endPos = endPos+1
nextPos=endPos+1
! ret.append(str[pos:endPos+1].strip())
pos = nextPos
return ret
Index: app.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/app.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** app.py 10 Feb 2008 13:33:31 -0000 1.12
--- app.py 9 Aug 2008 16:47:07 -0000 1.13
***************
*** 233,242 ****
# Load the users/application paths
new_path = []
! apppath=string.splitfields(win32ui.GetProfileVal('Python','Application Path',''),';')
for path in apppath:
if len(path)>0:
new_path.append(win32ui.FullPath(path))
for extra_num in range(1,11):
! apppath=string.splitfields(win32ui.GetProfileVal('Python','Application Path %d'%extra_num,''),';')
if len(apppath) == 0:
break
--- 233,242 ----
# Load the users/application paths
new_path = []
! apppath=win32ui.GetProfileVal('Python','Application Path','').split(';')
for path in apppath:
if len(path)>0:
new_path.append(win32ui.FullPath(path))
for extra_num in range(1,11):
! apppath=win32ui.GetProfileVal('Python','Application Path %d'%extra_num,'').split(';')
if len(apppath) == 0:
break
Index: sgrepmdi.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/sgrepmdi.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** sgrepmdi.py 25 Feb 2008 12:27:35 -0000 1.6
--- sgrepmdi.py 9 Aug 2008 16:47:07 -0000 1.7
***************
*** 42,50 ****
class dirpath:
def __init__(self, str, recurse=0):
! dp = string.split(str, ';')
dirs = {}
for d in dp:
if os.path.isdir(d):
! d = string.lower(d)
if not dirs.has_key(d):
dirs[d] = None
--- 42,50 ----
class dirpath:
def __init__(self, str, recurse=0):
! dp = str.split(';')
dirs = {}
for d in dp:
if os.path.isdir(d):
! d = d.lower()
if not dirs.has_key(d):
dirs[d] = None
***************
*** 52,56 ****
subdirs = getsubdirs(d)
for sd in subdirs:
! sd = string.lower(sd)
if not dirs.has_key(sd):
dirs[sd] = None
--- 52,56 ----
subdirs = getsubdirs(d)
for sd in subdirs:
! sd = sd.lower()
if not dirs.has_key(sd):
dirs[sd] = None
***************
*** 62,66 ****
x = dirpath(os.environ[d])
elif d[:5] == 'HKEY_':
! keystr = string.split(d,'\\')
try:
root = eval('win32con.'+keystr[0])
--- 62,66 ----
x = dirpath(os.environ[d])
elif d[:5] == 'HKEY_':
! keystr = d.split('\\')
try:
root = eval('win32con.'+keystr[0])
***************
*** 68,72 ****
win32ui.MessageBox("Can't interpret registry key name '%s'" % keystr[0])
try:
! subkey = string.join(keystr[1:], '\\')
val = win32api.RegQueryValue(root, subkey)
if val:
--- 68,72 ----
win32ui.MessageBox("Can't interpret registry key name '%s'" % keystr[0])
try:
! subkey = '\\'.join(keystr[1:])
val = win32api.RegQueryValue(root, subkey)
if val:
***************
*** 85,89 ****
subdirs = getsubdirs(xd)
for sd in subdirs:
! sd = string.lower(sd)
if not dirs.has_key(sd):
dirs[sd] = None
--- 85,89 ----
subdirs = getsubdirs(xd)
for sd in subdirs:
! sd = sd.lower()
if not dirs.has_key(sd):
dirs[sd] = None
***************
*** 137,141 ****
doc = self.FindOpenDocument(fileName)
if doc: return doc
! ext = string.lower(os.path.splitext(fileName)[1])
if ext =='.grep':
return win32ui.CDocTemplate_Confidence_yesAttemptNative
--- 137,141 ----
doc = self.FindOpenDocument(fileName)
if doc: return doc
! ext = os.path.splitext(fileName)[1].lower()
if ext =='.grep':
return win32ui.CDocTemplate_Confidence_yesAttemptNative
***************
*** 191,195 ****
if paramstr is None:
paramstr = win32ui.GetProfileVal("Grep", "Params", '\t\t\t1\t0\t0')
! params = string.split(paramstr, '\t')
if len(params) < 3:
params = params + ['']*(3-len(params))
--- 191,195 ----
if paramstr is None:
paramstr = win32ui.GetProfileVal("Grep", "Params", '\t\t\t1\t0\t0')
! params = paramstr.split('\t')
if len(params) < 3:
params = params + ['']*(3-len(params))
***************
*** 237,241 ****
self.GetFirstView().Append('# Files '+self.filpattern+'\n')
self.GetFirstView().Append('# For '+self.greppattern+'\n')
! self.fplist = string.split(self.filpattern,';')
if self.casesensitive:
self.pat = re.compile(self.greppattern)
--- 237,241 ----
self.GetFirstView().Append('# Files '+self.filpattern+'\n')
self.GetFirstView().Append('# For '+self.greppattern+'\n')
! self.fplist = self.filpattern.split(';')
if self.casesensitive:
self.pat = re.compile(self.greppattern)
***************
*** 327,331 ****
if regexGrepResult:
fname = regexGrepResult.group(1)
! line = string.atoi(regexGrepResult.group(2))
scriptutils.JumpToDocument(fname, line)
return 0 # dont pass on
--- 327,331 ----
if regexGrepResult:
fname = regexGrepResult.group(1)
! line = int(regexGrepResult.group(2))
scriptutils.JumpToDocument(fname, line)
return 0 # dont pass on
***************
*** 340,344 ****
if regexGrepResult:
self.fnm = regexGrepResult.group(1)
! self.lnnum = string.atoi(regexGrepResult.group(2))
menu.AppendMenu(flags, ID_OPEN_FILE, "&Open "+self.fnm)
menu.AppendMenu(win32con.MF_SEPARATOR)
--- 340,344 ----
if regexGrepResult:
self.fnm = regexGrepResult.group(1)
! self.lnnum = int(regexGrepResult.group(2))
menu.AppendMenu(flags, ID_OPEN_FILE, "&Open "+self.fnm)
menu.AppendMenu(win32con.MF_SEPARATOR)
***************
*** 366,370 ****
#hope you have an editor that implements GotoLine()!
try:
! vw.GotoLine(string.atoi(self.lnnum))
except:
pass
--- 366,370 ----
#hope you have an editor that implements GotoLine()!
try:
! vw.GotoLine(int(self.lnnum))
except:
pass
***************
*** 373,379 ****
def OnCmdGrep(self, cmd, code):
curparamsstr = self.GetDocument().GetParams()
! params = string.split(curparamsstr,'\t')
params[2] = self.sel
! greptemplate.setParams(string.join(params,'\t'))
greptemplate.OpenDocumentFile()
return 0
--- 373,379 ----
def OnCmdGrep(self, cmd, code):
curparamsstr = self.GetDocument().GetParams()
! params = curparamsstr.split('\t')
params[2] = self.sel
! greptemplate.setParams('\t'.join(params))
greptemplate.OpenDocumentFile()
return 0
***************
*** 447,454 ****
items = []
for secitem in secitems:
! items.append(string.split(secitem,'=')[1])
dlg = GrepParamsDialog(items)
if dlg.DoModal() == win32con.IDOK:
! itemstr = string.join(dlg.getItems(),';')
self._obj_.data[key] = itemstr
#update the ini file with dlg.getNew()
--- 447,454 ----
items = []
for secitem in secitems:
! items.append(secitem.split('=')[1])
dlg = GrepParamsDialog(items)
if dlg.DoModal() == win32con.IDOK:
! itemstr = ';'.join(dlg.getItems())
self._obj_.data[key] = itemstr
#update the ini file with dlg.getNew()
Index: help.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/help.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** help.py 19 May 2008 13:55:01 -0000 1.11
--- help.py 9 Aug 2008 16:47:07 -0000 1.12
***************
*** 34,38 ****
try:
if helpCmd is None: helpCmd = win32con.HELP_CONTENTS
! ext = string.lower(os.path.splitext(fileName)[1])
if ext == ".hlp":
win32api.WinHelp( win32ui.GetMainFrame().GetSafeHwnd(), fileName, helpCmd, helpArg)
--- 34,38 ----
try:
if helpCmd is None: helpCmd = win32con.HELP_CONTENTS
! ext = os.path.splitext(fileName)[1].lower()
if ext == ".hlp":
win32api.WinHelp( win32ui.GetMainFrame().GetSafeHwnd(), fileName, helpCmd, helpArg)
Index: winout.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/winout.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** winout.py 22 Mar 2006 10:50:44 -0000 1.13
--- winout.py 9 Aug 2008 16:47:07 -0000 1.14
***************
*** 125,129 ****
try:
import win32api, win32con
! det = eval(string.strip(line[string.find(line,":")+1:]))
win32ui.SetStatusText("Opening help file on OLE error...");
import help
--- 125,129 ----
try:
import win32api, win32con
! det = eval(line[line.find(":")+1:].strip())
win32ui.SetStatusText("Opening help file on OLE error...");
import help
***************
*** 164,168 ****
win32ui.SetStatusText("Jumping to line "+lineNoString+" of file "+fileName,1)
! if not scriptutils.JumpToDocument(fileName, string.atoi(lineNoString)):
win32ui.SetStatusText("Could not open %s" % fileName)
return 1 # still was an error message.
--- 164,168 ----
win32ui.SetStatusText("Jumping to line "+lineNoString+" of file "+fileName,1)
! if not scriptutils.JumpToDocument(fileName, int(lineNoString)):
win32ui.SetStatusText("Could not open %s" % fileName)
return 1 # still was an error message.
***************
*** 456,460 ****
return 1 # In trouble - so say we have nothing to do.
win32ui.PumpWaitingMessages() # Pump paint messages
! self.currentView.dowrite(string.join(items,''))
return rc
--- 456,460 ----
return 1 # In trouble - so say we have nothing to do.
win32ui.PumpWaitingMessages() # Pump paint messages
! self.currentView.dowrite(''.join(items))
return rc
***************
*** 466,470 ****
# debug("not my thread - ignoring queue options!\n")
elif self.writeQueueing==flags.WQ_LINE:
! pos = string.rfind(message, '\n')
if pos>=0:
# debug("Line queueing - forcing flush\n")
--- 466,470 ----
# debug("not my thread - ignoring queue options!\n")
elif self.writeQueueing==flags.WQ_LINE:
! pos = message.rfind('\n')
if pos>=0:
# debug("Line queueing - forcing flush\n")
Index: bitmap.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/bitmap.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** bitmap.py 1 Sep 1999 23:33:44 -0000 1.1
--- bitmap.py 9 Aug 2008 16:47:07 -0000 1.2
***************
*** 104,108 ****
doc = self.FindOpenDocument(fileName)
if doc: return doc
! ext = string.lower(os.path.splitext(fileName)[1])
if ext =='.bmp': # removed due to PIL! or ext=='.ppm':
return win32ui.CDocTemplate_Confidence_yesAttemptNative
--- 104,108 ----
doc = self.FindOpenDocument(fileName)
if doc: return doc
! ext = os.path.splitext(fileName)[1].lower()
if ext =='.bmp': # removed due to PIL! or ext=='.ppm':
return win32ui.CDocTemplate_Confidence_yesAttemptNative
Index: scriptutils.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/scriptutils.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** scriptutils.py 26 Feb 2008 06:40:23 -0000 1.16
--- scriptutils.py 9 Aug 2008 16:47:07 -0000 1.17
***************
*** 23,30 ****
RS_DEBUGGER_PM=3 # Dont run under debugger, but do post-mortem analysis on exception.
! debugging_options = string.split("""No debugging
Step-through in the debugger
Run in the debugger
! Post-Mortem of unhandled exceptions""", "\n")
# A dialog box for the "Run Script" command.
--- 23,30 ----
RS_DEBUGGER_PM=3 # Dont run under debugger, but do post-mortem analysis on exception.
! debugging_options = """No debugging
Step-through in the debugger
Run in the debugger
! Post-Mortem of unhandled exceptions""".split("\n")
# A dialog box for the "Run Script" command.
***************
*** 99,108 ****
# If on path, _and_ existing package of that name loaded.
if IsOnPythonPath(path) and sys.modules.has_key(modBit) and \
! ( os.path.exists(os.path.join(path, '__init__.py')) or \
! os.path.exists(os.path.join(path, '__init__.pyc')) or \
! os.path.exists(os.path.join(path, '__init__.pyo')) \
! ):
modBits.reverse()
! return string.join(modBits, ".") + "." + fname, newPathReturn
# Not found - look a level higher
else:
--- 99,108 ----
# If on path, _and_ existing package of that name loaded.
if IsOnPythonPath(path) and sys.modules.has_key(modBit) and \
! ( os.path.exists(os.path.join(path, '__init__.py')) or \
! os.path.exists(os.path.join(path, '__init__.pyc')) or \
! os.path.exists(os.path.join(path, '__init__.pyo')) \
! ):
modBits.reverse()
! return ".".join(modBits) + "." + fname, newPathReturn
# Not found - look a level higher
else:
***************
*** 363,367 ****
if pathName is not None:
! if string.lower(os.path.splitext(pathName)[1]) <> ".py":
pathName = None
--- 363,367 ----
if pathName is not None:
! if os.path.splitext(pathName)[1].lower() <> ".py":
pathName = None
***************
*** 383,387 ****
fname = mod.__file__
base, ext = os.path.splitext(fname)
! if string.lower(ext) in ['.pyo', '.pyc']:
ext = '.py'
fname = base + ext
--- 383,387 ----
fname = mod.__file__
base, ext = os.path.splitext(fname)
! if ext.lower() in ['.pyo', '.pyc']:
ext = '.py'
fname = base + ext
***************
*** 400,404 ****
bNeedReload = 0
! win32ui.SetStatusText(string.capitalize(what)+'ing module...',1)
win32ui.DoWaitCursor(1)
# win32ui.GetMainFrame().BeginWaitCursor()
--- 400,404 ----
bNeedReload = 0
! win32ui.SetStatusText(what.capitalize()+'ing module...',1)
win32ui.DoWaitCursor(1)
# win32ui.GetMainFrame().BeginWaitCursor()
***************
*** 432,436 ****
what = "check"
! win32ui.SetStatusText(string.capitalize(what)+'ing module...',1)
win32ui.DoWaitCursor(1)
try:
--- 432,436 ----
what = "check"
! win32ui.SetStatusText(what.capitalize()+'ing module...',1)
win32ui.DoWaitCursor(1)
try:
***************
*** 473,477 ****
if data:
try:
! lineno = string.split(data)[1]
lineno = int(lineno)
_JumpToPosition(filename, lineno)
--- 473,477 ----
if data:
try:
! ...
[truncated message content] |