rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
def valueAsExpr(self): return 'wxSize(%d, %d)'%(self.value.x, self.value.y) | 43e4ab46eed5e41d2af40091522912ba9175fcc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/43e4ab46eed5e41d2af40091522912ba9175fcc3/PropertyEditors.py | ||
Utils.ShowErrorMessage(self.parent, 'Invalid value', mess) | Utils.ShowErrorMessage(self.parent, 'Invalid value', mess) | def getValue(self): if self.editorCtrl: try: tuplePos = eval(self.editorCtrl.getValue()) except Exception, mess: | 43e4ab46eed5e41d2af40091522912ba9175fcc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/43e4ab46eed5e41d2af40091522912ba9175fcc3/PropertyEditors.py |
return ClassPropEdit.getStyle(self) + [esDialog, esReadOnly] | return ClassPropEdit.getStyle(self) + [esDialog, esReadOnly, esRecreateProp] def getSubCompanion(self): from Companions.Companions import FontDTC return FontDTC | def getStyle(self): return ClassPropEdit.getStyle(self) + [esDialog, esReadOnly] | 43e4ab46eed5e41d2af40091522912ba9175fcc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/43e4ab46eed5e41d2af40091522912ba9175fcc3/PropertyEditors.py |
if dlg.ShowModal() == wxID_OK: self.value = dlg.GetFontData().GetChosenFont() self.propWrapper.setValue(self.value) self.obj.Refresh() dlg.Destroy() | try: if dlg.ShowModal() == wxID_OK: self.value = dlg.GetFontData().GetChosenFont() self.inspectorPost(false) finally: dlg.Destroy() | def edit(self, event): data = wxFontData() dlg = wxFontDialog(self.parent, data) dlg.GetFontData().SetInitialFont(self.value) if dlg.ShowModal() == wxID_OK: self.value = dlg.GetFontData().GetChosenFont() self.propWrapper.setValue(self.value) self.obj.Refresh() dlg.Destroy() | 43e4ab46eed5e41d2af40091522912ba9175fcc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/43e4ab46eed5e41d2af40091522912ba9175fcc3/PropertyEditors.py |
return 'wxFont(%d, %d, %d, %d, %d, %s)'%(fnt.GetPointSize(), fnt.GetFamily(), fnt.GetStyle(), fnt.GetWeight(), fnt.GetUnderlined(), `fnt.GetFaceName()`) | return 'wxFont(%d, %s, %s, %s, %s, %s)'%(\ fnt.GetPointSize(), self.fontFamily[fnt.GetFamily()], self.fontStyle[fnt.GetStyle()], self.fontWeight[fnt.GetWeight()], fnt.GetUnderlined() and 'true' or 'false', `fnt.GetFaceName()`) class AnchorPropEdit(OptionedPropEdit): def getStyle(self): return [esExpandable] def getSu... | def valueAsExpr(self): fnt = self.value return 'wxFont(%d, %d, %d, %d, %d, %s)'%(fnt.GetPointSize(), fnt.GetFamily(), fnt.GetStyle(), fnt.GetWeight(), fnt.GetUnderlined(), `fnt.GetFaceName()`) | 43e4ab46eed5e41d2af40091522912ba9175fcc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/43e4ab46eed5e41d2af40091522912ba9175fcc3/PropertyEditors.py |
def inspectorEdit(self): self.editorCtrl = ButtonIEC(self, self.value) self.editorCtrl.createControl(self.parent, self.idx, self.width, self.edit) constrs = self.companion.constructor() if constrs.has_key(self.name): constr = self.companion.textConstr.params[constrs[self.name]] else: | 43e4ab46eed5e41d2af40091522912ba9175fcc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/43e4ab46eed5e41d2af40091522912ba9175fcc3/PropertyEditors.py | ||
self.setCtrlValue(self.value, self.value) self.refreshCompCtrl() | self.inspectorPost(false) | def edit(self, event): dlg = wxFileDialog(self.parent, 'Choose an image', '.', '', 'Bitmaps (*.bmp)|*.bmp', wxOPEN) try: if dlg.ShowModal() == wxID_OK: self.bmpPath = dlg.GetPath() self.value = wxBitmap(self.bmpPath, wxBITMAP_TYPE_BMP) self.setCtrlValue(self.value, self.value) | 43e4ab46eed5e41d2af40091522912ba9175fcc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/43e4ab46eed5e41d2af40091522912ba9175fcc3/PropertyEditors.py |
## def inspectorPost(self): | 43e4ab46eed5e41d2af40091522912ba9175fcc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/43e4ab46eed5e41d2af40091522912ba9175fcc3/PropertyEditors.py | ||
print 'executing', cmd, args | def run(self, args = ''): """ Excecute the current saved image of the application. """ if self.savedAs: cwd = os.path.abspath(os.getcwd()) os.chdir(os.path.dirname(self.filename)) oldErr = sys.stderr oldSysPath = sys.path[:] try: sys.path.append(Preferences.pyPath) cmd = '"%s" %s %s'%(sys.executable, os.path.basename(s... | a95bec86e63a8c27ab6805bbc08330615432539a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/a95bec86e63a8c27ab6805bbc08330615432539a/EditorModels.py | |
def readComponents(self): """ Setup object collection dict by parsing all designer controlled methods """ self.objectCollections = {} module = self.getModule() if module.classes.has_key(self.main): main = module.classes[self.main] for oc in self.identifyCollectionMethods(): codeSpan = main.methods[oc] codeBody = module... | a95bec86e63a8c27ab6805bbc08330615432539a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/a95bec86e63a8c27ab6805bbc08330615432539a/EditorModels.py | ||
import ErrorStackFrm esf = ErrorStackFrm.ErrorStackMF(self.editor, self.app, self.editor) esf.updateCtrls(err) esf.Show(true) return esf | frm = self.editor.erroutFrm if frm: frm.updateCtrls(err) if not frm.IsShown(): frm.Show(true) return frm | def crashLog(self): err = ErrorStack.crashError(os.path.splitext(self.filename)[0]+'.trace') if err: import ErrorStackFrm esf = ErrorStackFrm.ErrorStackMF(self.editor, self.app, self.editor) esf.updateCtrls(err) esf.Show(true) return esf else: wx.wxLogError('Trace file not found. Run with command line param -T') return... | a95bec86e63a8c27ab6805bbc08330615432539a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/a95bec86e63a8c27ab6805bbc08330615432539a/EditorModels.py |
self.evtToSend = [] | def __init__(self, parent, ID, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, validator = wxDefaultValidator, name = "genbutton"): if style == 0: style = wxNO_BORDER wxControl.__init__(self, parent, ID, pos, size, style, validator, name) | 93a6749712f6d7c37f5356f322e0fd4d4f4e3623 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/93a6749712f6d7c37f5356f322e0fd4d4f4e3623/buttons.py | |
EVT_IDLE(self, self.OnIdle) | def __init__(self, parent, ID, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, validator = wxDefaultValidator, name = "genbutton"): if style == 0: style = wxNO_BORDER wxControl.__init__(self, parent, ID, pos, size, style, validator, name) | 93a6749712f6d7c37f5356f322e0fd4d4f4e3623 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/93a6749712f6d7c37f5356f322e0fd4d4f4e3623/buttons.py | |
faceClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE) textClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNTEXT) | if no_sys_col: faceClr = wxColour(192, 192, 192) textClr = wxColour(0, 0, 0) else: faceClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE) textClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNTEXT) | def InitColours(self): faceClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE) textClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNTEXT) self.faceDnClr = faceClr self.SetBackgroundColour(faceClr) self.SetForegroundColour(textClr) | 93a6749712f6d7c37f5356f322e0fd4d4f4e3623 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/93a6749712f6d7c37f5356f322e0fd4d4f4e3623/buttons.py |
shadowClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNSHADOW) highlightClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNHIGHLIGHT) | if no_sys_col: shadowClr = wxColour(128, 128, 128) highlightClr = wxColour(228, 228, 228) else: shadowClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNSHADOW) highlightClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNHIGHLIGHT) | def InitColours(self): faceClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE) textClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNTEXT) self.faceDnClr = faceClr self.SetBackgroundColour(faceClr) self.SetForegroundColour(textClr) | 93a6749712f6d7c37f5356f322e0fd4d4f4e3623 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/93a6749712f6d7c37f5356f322e0fd4d4f4e3623/buttons.py |
self.evtToSend.append(evt) def OnIdle(self, evt): while self.evtToSend: evt = self.evtToSend[0] del self.evtToSend[0] self.GetEventHandler().ProcessEvent(evt) | self.GetEventHandler().ProcessEvent(evt) | def Notify(self): evt = wxGenButtonEvent(wxEVT_COMMAND_BUTTON_CLICKED, self.GetId()) evt.SetIsDown(not self.up) evt.SetButtonObj(self) self.evtToSend.append(evt) | 93a6749712f6d7c37f5356f322e0fd4d4f4e3623 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/93a6749712f6d7c37f5356f322e0fd4d4f4e3623/buttons.py |
if not curdir: | if not curdir or curdir == 'none:': | def openFileDlg(self, filter='*.py', curdir='.', curfile=''): if filter == '*.py': filter = Preferences.exDefaultFilter | bda409086cb4a9996d5e1b7c3429ce9c4acbdc9c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/bda409086cb4a9996d5e1b7c3429ce9c4acbdc9c/Editor.py |
for c in value: if c not in string.letters+string.digits+'_': | if not value[1:-1]: message = 'Invalid name for Python object' wxLogError(message) return self.value for c in value[1:-1]: if c not in string.letters+string.digits+'_': | def getValue(self): if self.editorCtrl: value = self.editorCtrl.getValue() if type(value) is StringType: value = `self.editorCtrl.getValue()` else: value = self.getCtrlValue() | 1397bfbe2c9097ed0eb1393e1ab23888413c8202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1397bfbe2c9097ed0eb1393e1ab23888413c8202/PropertyEditors.py |
if not value: message = 'Invalid name for Python object' wxLogError(message) return self.value | def getValue(self): # XXX Currently returning the old value in case of error because # XXX an exception here cannot be gracefully handled yet. # XXX Specifically closing the frame with the focus on the if self.editorCtrl: value = self.editorCtrl.getValue() if value != self.value: if self.companion.designer.objects.has_... | 1397bfbe2c9097ed0eb1393e1ab23888413c8202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1397bfbe2c9097ed0eb1393e1ab23888413c8202/PropertyEditors.py | |
def getValue(self): # XXX Currently returning the old value in case of error because # XXX an exception here cannot be gracefully handled yet. # XXX Specifically closing the frame with the focus on the if self.editorCtrl: value = self.editorCtrl.getValue() if value != self.value: if self.companion.designer.objects.has_... | 1397bfbe2c9097ed0eb1393e1ab23888413c8202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1397bfbe2c9097ed0eb1393e1ab23888413c8202/PropertyEditors.py | ||
if not frame.f_locals.get('__traced'): frame.f_locals['__traced'] = 1 | if frame.f_lineno == frame.f_code.co_firstlineno: | def isTraceable(self, frame): """Indicates whether the debugger should step into the given frame. | b8648f6e1703b9e43c73c8c68b84b33fc08ec37b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/b8648f6e1703b9e43c73c8c68b84b33fc08ec37b/ZopeScriptDebugServer.py |
newNode = self.createChildNode(self.resourcepath+fn, 0, self.properties) | newNode = self.createChildNode(self.resourcepath+fn, self.properties) | def copyFromFS(self, fsNode, fn=''): if fsNode.isFolderish(): if not fn: fn = os.path.basename(fsNode.resourcepath[:-1]) self.newFolder(fn) else: if not fn: fn = os.path.basename(fsNode.resourcepath) newNode = self.createChildNode(self.resourcepath+fn, 0, self.properties) self.checkResp(newNode.resource.put(fsNode.load... | 6c514a414031cf5b20ee65b1b33c00bb9dc8a108 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/6c514a414031cf5b20ee65b1b33c00bb9dc8a108/DAVExplorer.py |
('Toggle breakpoint', self.OnSetBreakPoint, self.breakBmp, keyDefs['ToggleBrk']), | ('Toggle breakpoint', self.OnSetBreakPoint, self.breakBmp, keyDefs['ToggleBrk']), | def __init__(self, parent, model): a1 = (('-', None, '', ()), ('Comment', self.OnComment, '-', keyDefs['Comment']), ('Uncomment', self.OnUnComment, '-', keyDefs['Uncomment']), ('Indent', self.OnIndent, '-', keyDefs['Indent']), ('Dedent', self.OnDedent, '-', keyDefs['Dedent']), ('-', None, '-', ()), ('Run to cursor', se... | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
('Add comment line', self.OnAddCommentLine, '-', keyDefs['DashLine']), | ('Add comment line', self.OnAddCommentLine, '-', keyDefs['DashLine']), | def __init__(self, parent, model): a1 = (('-', None, '', ()), ('Comment', self.OnComment, '-', keyDefs['Comment']), ('Uncomment', self.OnUnComment, '-', keyDefs['Uncomment']), ('Indent', self.OnIndent, '-', keyDefs['Indent']), ('Dedent', self.OnDedent, '-', keyDefs['Dedent']), ('-', None, '-', ()), ('Run to cursor', se... | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
if Preferences.useDebugger == 'new': filename = self.model.filename self.breaks = bplist.getFileBreakpoints(filename) | def __init__(self, parent, model): a1 = (('-', None, '', ()), ('Comment', self.OnComment, '-', keyDefs['Comment']), ('Uncomment', self.OnUnComment, '-', keyDefs['Uncomment']), ('Indent', self.OnIndent, '-', keyDefs['Indent']), ('Dedent', self.OnDedent, '-', keyDefs['Dedent']), ('-', None, '-', ()), ('Run to cursor', se... | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py | |
filename = string.lower(self.model.filename) for file, lineno in bdb.Breakpoint.bplist.keys(): if file == filename: for bp in bdb.Breakpoint.bplist[(file, lineno)]: self.breaks[lineno] = bp | if Preferences.useDebugger == 'old': filename = string.lower(self.model.filename) for file, lineno in bdb.Breakpoint.bplist.keys(): if file == filename: for bp in bdb.Breakpoint.bplist[(file, lineno)]: self.breaks[lineno] = bp | def __init__(self, parent, model): a1 = (('-', None, '', ()), ('Comment', self.OnComment, '-', keyDefs['Comment']), ('Uncomment', self.OnUnComment, '-', keyDefs['Uncomment']), ('Indent', self.OnIndent, '-', keyDefs['Indent']), ('Dedent', self.OnDedent, '-', keyDefs['Dedent']), ('-', None, '-', ()), ('Run to cursor', se... | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
if new_stc: self.AutoCompSetIgnoreCase(true) | self.AutoCompSetIgnoreCase(true) | def __init__(self, parent, model): a1 = (('-', None, '', ()), ('Comment', self.OnComment, '-', keyDefs['Comment']), ('Uncomment', self.OnUnComment, '-', keyDefs['Uncomment']), ('Indent', self.OnIndent, '-', keyDefs['Indent']), ('Dedent', self.OnDedent, '-', keyDefs['Dedent']), ('-', None, '-', ()), ('Run to cursor', se... | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
if wx.__dict__[name].__init__.__doc__: return wx.__dict__[name].__init__.__doc__ | return wx.__dict__[name].__init__.__doc__ or '' | def checkWxPyTips(self, module, name): if module.imports.has_key('wxPython.wx'): if wx.__dict__.has_key(name): t = type(wx.__dict__[name]) if t is types.ClassType: if wx.__dict__[name].__init__.__doc__: return wx.__dict__[name].__init__.__doc__ return '' | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
if meth.__doc__: return meth.__doc__ | return meth.__doc__ or '' | def checkWxPyMethodTips(self, module, cls, name): if module.imports.has_key('wxPython.wx'): if wx.__dict__.has_key(cls): Cls = wx.__dict__[cls] if hasattr(Cls, name): meth = getattr(Cls, name) if meth.__doc__: return meth.__doc__ return '' | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
return getattr(klass, meth).__doc__ | return getattr(klass, meth).__doc__ or '' | def getAttribSig(self, module, cls, attrib, meth): if cls.attributes.has_key(attrib): objtype = cls.attributes[attrib][0].signature if module.classes.has_key(objtype) and \ module.classes[objtype].methods.has_key(meth): return module.classes[objtype].methods[meth].signature klass = wxNamespace.getWxClass(objtype) if kl... | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
meth = cls.getMethodForLineNo(lnNo) | methName, meth = cls.getMethodForLineNo(lnNo) | def getCodeCompOptions(self, word, rootWord, matchWord, lnNo): """ Overwritten Mixin method, returns list of code completion names """ module = self.model.getModule() cls = module.getClassForLineNo(lnNo) if cls: objPth = string.split(rootWord, '.') | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
def getCodeNamespace(self, module, block): names = [] names.extend(module.imports.keys()) names.extend(module.class_order) names.extend(module.function_order) names.extend(module.global_order) names.extend(__builtins__.keys()) if block: names.extend(block.localnames()) | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py | ||
meth = cls.getMethodForLineNo(lineNo) | methName, meth = cls.getMethodForLineNo(lineNo) | def BrowseClick(self, word, line, lineNo, start, style): """ Overridden from BrowseStyledTextCtrlMix, jumps to declaration or opens module | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
if self.model.editor.debugger and self.model.editor.debugger.isDebugBrowsing(): word, line, lnNo, wordStart = self.getStyledWordElems(start, length) self.IndicatorSetColour(0, wxRED) try: val = self.model.editor.debugger.getVarValue(word) except Exception, message: val = str(message) if val: self.model.editor.statusBar... | debugger = self.model.editor.debugger if Preferences.useDebugger == 'new': start, length = BrowseStyledTextCtrlMix.underlineWord( self, start, length) debugger = self.model.editor.debugger if debugger: word, line, lnNo, wordStart = self.getStyledWordElems( start, length) self.IndicatorSetForeground(0, wxRED) debugger.r... | def underlineWord(self, start, length): start, length = BrowseStyledTextCtrlMix.underlineWord(self, start, length) if self.model.editor.debugger and self.model.editor.debugger.isDebugBrowsing(): word, line, lnNo, wordStart = self.getStyledWordElems(start, length) self.IndicatorSetColour(0, wxRED) try: val = self.model.... | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
if self.model.editor.debugger and self.model.editor.debugger.isDebugBrowsing(): | debugger = self.model.editor.debugger if debugger and debugger.isDebugBrowsing(): | def getBrowsableText(self, line, piv, lnStPs): if self.model.editor.debugger and self.model.editor.debugger.isDebugBrowsing(): return idWord(line, piv, lnStPs, object_delim) else: return BrowseStyledTextCtrlMix.getBrowsableText(self, line, piv, lnStPs) | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
for bp in self.breaks.values(): self.MarkerAdd(bp.line -1, brkPtMrk) def setBdbBreakpoints(self): for bp in self.breaks.values(): self.MarkerAdd(bp.line -1, brkPtMrk) | if Preferences.useDebugger == 'new': for brk in self.breaks.listBreakpoints(): if brk['temporary']: mrk = tmpBrkPtMrk else: mrk = brkPtMrk self.MarkerAdd(brk['lineno'] - 1, mrk) elif Preferences.useDebugger == 'old': for bp in self.breaks.values(): self.MarkerAdd(bp.line -1, brkPtMrk) | def setInitialBreakpoints(self): for bp in self.breaks.values(): self.MarkerAdd(bp.line -1, brkPtMrk) | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
if not self.breaks.has_key(lineNo): return bp = self.breaks[lineNo] if bp.temporary: | if Preferences.useDebugger == 'new': self.breaks.deleteBreakpoints(lineNo) debugger = self.model.editor.debugger if debugger: filename = self.model.filename debugger.deleteBreakpoints(filename, lineNo) self.MarkerDelete(lineNo - 1, brkPtMrk) | def deleteBreakPoint(self, lineNo): if not self.breaks.has_key(lineNo): return | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
else: self.MarkerDelete(lineNo - 1, brkPtMrk) if self.model.editor.debugger: | elif Preferences.useDebugger == 'old': if not self.breaks.has_key(lineNo): return | def deleteBreakPoint(self, lineNo): if not self.breaks.has_key(lineNo): return | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
res = self.model.editor.debugger.clear_break(bp.file, bp.line) if res: print res self.model.editor.debugger.breakpts.refreshList() else: self.breaks[lineNo].deleteMe() del self.breaks[lineNo] def addBreakPoint(self, lineNo, temp = 0): if wxPlatform == '__WXMSW__': filename = string.lower(self.model.filename) else: fi... | if bp.temporary: self.MarkerDelete(lineNo - 1, tmpBrkPtMrk) else: self.MarkerDelete(lineNo - 1, brkPtMrk) if self.model.editor.debugger: bp = self.breaks[lineNo] res = self.model.editor.debugger.clear_break(bp.file, bp.line) if res: print res self.model.editor.debugger.breakpts.refreshList() else: self.breaks[lineNo].... | def deleteBreakPoint(self, lineNo): if not self.breaks.has_key(lineNo): return | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
update = false if os.path.exists(fn): self.breaks = pickle.load(open(fn)) self.setInitialBreakpoints() BrkPt = bdb.Breakpoint for lineNo, brk in self.breaks.items(): if self.model.editor.debugger: self.model.editor.debugger.set_break(brk.file, lineNo) update = true else: BrkPt.bpbynumber.append(brk) if BrkPt.bplist.has... | if Preferences.useDebugger == 'new': rval = self.breaks.loadBreakpoints(fn) if rval: self.setInitialBreakpoints() return rval elif Preferences.useDebugger == 'old': update = false if os.path.exists(fn): self.breaks = pickle.load(open(fn)) self.setInitialBreakpoints() BrkPt = bdb.Breakpoint for lineNo, brk in self.br... | def tryLoadBreakpoints(self): import pickle fn = self.getBreakpointFilename() update = false if os.path.exists(fn): self.breaks = pickle.load(open(fn)) self.setInitialBreakpoints() BrkPt = bdb.Breakpoint for lineNo, brk in self.breaks.items(): if self.model.editor.debugger: self.model.editor.debugger.set_break(brk.file... | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
BrkPt.bplist[brk.file, brk.line] = [brk] if update: self.model.editor.debugger.breakpts.refreshList() return true else: self.breaks = {} return false | BrkPt.bpbynumber.append(brk) if BrkPt.bplist.has_key((brk.file, brk.line)): BrkPt.bplist[brk.file, brk.line].append(brk) else: BrkPt.bplist[brk.file, brk.line] = [brk] if update: self.model.editor.debugger.breakpts.refreshList() return true else: self.breaks = {} return false | def tryLoadBreakpoints(self): import pickle fn = self.getBreakpointFilename() update = false if os.path.exists(fn): self.breaks = pickle.load(open(fn)) self.setInitialBreakpoints() BrkPt = bdb.Breakpoint for lineNo, brk in self.breaks.items(): if self.model.editor.debugger: self.model.editor.debugger.set_break(brk.file... | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
import pickle | def saveBreakpoints(self): # XXX This is not yet called automatically on saving a module, should it be ? import pickle fn = self.getBreakpointFilename() if len(self.breaks): pickle.dump(self.breaks, open(fn, 'w')) elif os.path.exists(fn): os.remove(fn) | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py | |
if len(self.breaks): pickle.dump(self.breaks, open(fn, 'w')) elif os.path.exists(fn): os.remove(fn) | if Preferences.useDebugger == 'new': self.breaks.saveBreakpoints(fn) elif Preferences.useDebugger == 'old': if len(self.breaks): pickle.dump(self.breaks, open(fn, 'w')) elif os.path.exists(fn): os.remove(fn) def clearStepPos(self, lineNo): if lineNo < 0: lineNo = 0 self.MarkerDelete(lineNo, stepPosMrk) | def saveBreakpoints(self): # XXX This is not yet called automatically on saving a module, should it be ? import pickle fn = self.getBreakpointFilename() if len(self.breaks): pickle.dump(self.breaks, open(fn, 'w')) elif os.path.exists(fn): os.remove(fn) | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
if self.stepPos != lineNo: if self.stepPos: self.MarkerDelete(self.stepPos, stepPosMrk) if lineNo: self.MarkerAdd(lineNo, stepPosMrk) self.stepPos = lineNo | if Preferences.useDebugger == 'new': if lineNo < 0: lineNo = 0 self.MarkerAdd(lineNo, stepPosMrk) self.MarkerDelete(lineNo, tmpBrkPtMrk) elif Preferences.useDebugger == 'old': if self.stepPos != lineNo: if self.stepPos: self.MarkerDelete(self.stepPos, stepPosMrk) if lineNo: self.MarkerAdd(lineNo, stepPosMrk) self.stepP... | def setStepPos(self, lineNo): if self.stepPos != lineNo: if self.stepPos: self.MarkerDelete(self.stepPos, stepPosMrk) if lineNo: self.MarkerAdd(lineNo, stepPosMrk) self.stepPos = lineNo | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
lineClicked = self.GetLineFromPos(event.GetPosition()) + 1 if self.breaks.has_key(lineClicked): self.deleteBreakPoint(lineClicked) else: self.addBreakPoint(lineClicked) | lineClicked = self.LineFromPosition(event.GetPosition()) + 1 if Preferences.useDebugger == 'old': if self.breaks.has_key(lineClicked): self.deleteBreakPoint(lineClicked) else: self.addBreakPoint(lineClicked) elif Preferences.useDebugger == 'new': if self.breaks.hasBreakpoint(lineClicked): self.deleteBreakPoint(lineClic... | def OnMarginClick(self, event): if event.GetMargin() == 1: lineClicked = self.GetLineFromPos(event.GetPosition()) + 1 if self.breaks.has_key(lineClicked): self.deleteBreakPoint(lineClicked) else: self.addBreakPoint(lineClicked) else: FoldingStyledTextCtrlMix.OnMarginClick(self, event) | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
line = self.GetLineFromPos(self.GetCurrentPos()) + 1 if self.breaks.has_key(line): self.deleteBreakPoint(line) else: self.addBreakPoint(line) | line = self.LineFromPosition(self.GetCurrentPos()) + 1 if Preferences.useDebugger == 'old': if self.breaks.has_key(line): self.deleteBreakPoint(line) else: self.addBreakPoint(line) elif Preferences.useDebugger == 'new': if self.breaks.hasBreakpoint(line): self.deleteBreakPoint(line) else: self.addBreakPoint(line) | def OnSetBreakPoint(self, event): line = self.GetLineFromPos(self.GetCurrentPos()) + 1 if self.breaks.has_key(line): self.deleteBreakPoint(line) else: self.addBreakPoint(line) | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
line = self.GetLineFromPos(self.GetCurrentPos()) + 1 if not self.breaks.has_key(line): self.addBreakPoint(line, 1) if self.model.defaultName == 'App': self.model.editor.debugger.debug_file(self.model.filename) elif self.model.app: self.model.editor.debugger.debug_file(self.model.app.filename) | if Preferences.useDebugger == 'new': line = self.LineFromPosition(self.GetCurrentPos()) + 1 self.addBreakPoint(line, temp=1, notify_debugger=0) temp_breakpoint = (path.normcase(path.abspath( self.model.filename)), line) self.model.debug(cont_if_running=1, cont_always=1, temp_breakpoint=temp_breakpoint) elif Preferenc... | def OnRunToCursor(self, event): line = self.GetLineFromPos(self.GetCurrentPos()) + 1 if not self.breaks.has_key(line): self.addBreakPoint(line, 1) if self.model.defaultName == 'App': self.model.editor.debugger.debug_file(self.model.filename) elif self.model.app: self.model.editor.debugger.debug_file(self.model.app.file... | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
lnStPs = self.GetLineStartPos(lnNo) line = self.GetCurrentLineText()[0] | lnStPs = self.PositionFromLine(lnNo) line = self.GetCurLine()[0] | def OnContextHelp(self, event): pos = self.GetCurrentPos() lnNo = self.GetCurrentLine() lnStPs = self.GetLineStartPos(lnNo) line = self.GetCurrentLineText()[0] piv = pos - lnStPs start, length = idWord(line, piv, lnStPs) startLine = start-lnStPs word = line[startLine:startLine+length] Help.showContextHelp(self.model.ed... | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
line = self.GetCurrentLineText() | line = self.GetCurLine() | def OnKeyDown(self, event): if self.CallTipActive(): self.callTipCheck() | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
self.damagedLine = self.GetLineFromPos(pos) | self.damagedLine = self.LineFromPosition(pos) | def OnKeyDown(self, event): if self.CallTipActive(): self.callTipCheck() | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
if self.GetLineStartPos(self.GetLineFromPos(pos)) != pos: | if self.PositionFromLine(self.LineFromPosition(pos)) != pos: | def OnKeyDown(self, event): if self.CallTipActive(): self.callTipCheck() | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
ln = self.GetLineFromPos(pos) ls = self.GetLineStartPos(ln) | ln = self.LineFromPosition(pos) ls = self.PositionFromLine(ln) | def OnKeyDown(self, event): if self.CallTipActive(): self.callTipCheck() | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
ln = self.GetLineFromPos(pos) ls = self.GetLineStartPos(ln) | ln = self.LineFromPosition(pos) ls = self.PositionFromLine(ln) | def OnAddCommentLine(self, event): pos = self.GetCurrentPos() ln = self.GetLineFromPos(pos) ls = self.GetLineStartPos(ln) self.InsertText(ls, '#-------------------------------------------' '------------------------------------'+'\n') self.SetCurrentPosition(ls+4) | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
self.SetCurrentPosition(ls+4) | self.SetCurrentPos(ls+4) | def OnAddCommentLine(self, event): pos = self.GetCurrentPos() ln = self.GetLineFromPos(pos) ls = self.GetLineStartPos(ln) self.InsertText(ls, '#-------------------------------------------' '------------------------------------'+'\n') self.SetCurrentPosition(ls+4) | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
lnStPs = self.GetLineStartPos(lnNo) line = self.GetLine(lnNo) | lnStPs = self.PositionFromLine(lnNo) line = self.GetLine(lnNo) | def OnAddClassAtCursor(self, event): pos = self.GetCurrentPos() lnNo = self.GetCurrentLine() lnStPs = self.GetLineStartPos(lnNo) line = self.GetLine(lnNo)#self.GetCurrentLineText()[0] piv = pos - lnStPs start, length = idWord(line, piv, lnStPs, object_delim) startLine = start-lnStPs word = line[startLine:startLine+leng... | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
meth = cls.getMethodForLineNo(lnNo+1) | methName, meth = cls.getMethodForLineNo(lnNo+1) | def OnAddClassAtCursor(self, event): pos = self.GetCurrentPos() lnNo = self.GetCurrentLine() lnStPs = self.GetLineStartPos(lnNo) line = self.GetLine(lnNo)#self.GetCurrentLineText()[0] piv = pos - lnStPs start, length = idWord(line, piv, lnStPs, object_delim) startLine = start-lnStPs word = line[startLine:startLine+leng... | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py |
if linesAdded > 0: lines = string.split(textAdded, '\r\n') totAdded = linesAdded if len(lines) > 1 and len(lines) == linesAdded + 1: wxPostEvent(self, wxFixPasteEvent(self, string.join(lines, '\n'))) if self._blockUpdate: return | def OnModified(self, event): modType = event.GetModificationType() if modType == (wxSTC_MOD_CHANGEMARKER): pass linesAdded = event.GetLinesAdded() | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py | |
update = false if linesAdded: line = self.LineFromPosition(event.GetPosition()) if Preferences.useDebugger == 'old': for breakLine, breakPt in self.breaks.items()[:]: if breakLine >= line: self.moveBreakpoint(breakPt, linesAdded) update = true elif Preferences.useDebugger == 'new': self.breaks.moveBreakpoint(line, line... | def OnModified(self, event): modType = event.GetModificationType() if modType == (wxSTC_MOD_CHANGEMARKER): pass linesAdded = event.GetLinesAdded() | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py | |
if linesAdded and self.model._module: lineNo = self.LineFromPosition(event.GetPosition()) module = self.model.getModule() module.renumber(linesAdded, lineNo) | def OnModified(self, event): modType = event.GetModificationType() if modType == (wxSTC_MOD_CHANGEMARKER): pass linesAdded = event.GetLinesAdded() | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py | |
'Cancel Designer session?', 'Cancel', wxYES_NO | wxICON_WARNING) == wxID_YES: return | 'Cancel Designer session?', 'Cancel', wxYES_NO | wxICON_WARNING, parent=self) == wxNO: self.saveOnClose = true self.confirmCancel = false return | def OnCloseWindow(self, event): """ When the Designer closes, the code generation process is started. General Inspector and Designer clean-up """ if not self.saveOnClose and self.confirmCancel and wxMessageBox( 'Cancel Designer session?', 'Cancel', wxYES_NO | wxICON_WARNING) == wxID_YES: return if self.IsIconized(): ... | c50ba670fee232df1ee87e6140713de0dc8f78de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/c50ba670fee232df1ee87e6140713de0dc8f78de/Designer.py |
def reassignFileDlg(): import FileDlg wx.wxFileDialog = FileDlg.wxBoaFileDialog | 5a0ed07270d9f86677eb3911d5f3d5d4f8546f2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/5a0ed07270d9f86677eb3911d5f3d5d4f8546f2c/Preferences.py | ||
return self.isDir() or filter(lambda se, rp=self.resourcepath: se[1](rp), self.subExplorerReg['file']) | return self.isDir() or filter(lambda se, rp=self.resourcepath, ap=self.allowedProtocols : (ap == ['*'] or se[0].protocol in ap) and se[1](rp), self.subExplorerReg['file']) | def isFolderish(self): return self.isDir() or filter(lambda se, rp=self.resourcepath: se[1](rp), self.subExplorerReg['file']) | 6ba85f329a06a0f3e57b021eed6697a2cb8bef73 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/6ba85f329a06a0f3e57b021eed6697a2cb8bef73/FileExplorer.py |
return | newNameBase = os.path.join(self.resourcepath, 'copy%s_of_'+node.name) num = '' while 1: newName = newNameBase%num if os.path.exists(newName): try: num = str(int(num) + 1) except: num = '2' else: shutil.copy(node.resourcepath, newName) break else: shutil.copy(node.resourcepath, self.resourcepath) | def copyFileFrom(self, node): """ Copy node into self (only called for folders)""" import shutil if not node.isDir(): if node.resourcepath == os.path.join(self.resourcepath, node.name): return | 6ba85f329a06a0f3e57b021eed6697a2cb8bef73 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/6ba85f329a06a0f3e57b021eed6697a2cb8bef73/FileExplorer.py |
return open(self.resourcepath).read() | return open(self.resourcepath, 'rb').read() | def load(self): return open(self.resourcepath).read() | 6ba85f329a06a0f3e57b021eed6697a2cb8bef73 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/6ba85f329a06a0f3e57b021eed6697a2cb8bef73/FileExplorer.py |
f = open(self.resourcepath, 'w') | f = open(self.resourcepath, 'wb') | def save(self, filename, data): # XXX move dialog to gui layer if self.resourcepath != filename: self.resourcepath = filename self.name = os.path.basename(self.resourcepath) try: f = open(self.resourcepath, 'w') except IOError, message: dlg = wx.wxMessageDialog(self.editor, 'Could not save\n'+message.strerror, 'Error',... | 6ba85f329a06a0f3e57b021eed6697a2cb8bef73 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/6ba85f329a06a0f3e57b021eed6697a2cb8bef73/FileExplorer.py |
import urllib url = 'http://%s:%d/%s/source.html'%(self.model.zopeObj.properties['host'], self.model.zopeObj.properties['httpport'], | props = self.model.zopeObj.properties url = 'http://%s:%d/%s/source.html'%(props['host'], props['httpport'], | def generatePage(self): import urllib url = 'http://%s:%d/%s/source.html'%(self.model.zopeObj.properties['host'], self.model.zopeObj.properties['httpport'], self.model.zopeObj.whole_name()) f = urllib.urlopen(url) return f.read() | 7c20e70113e97a8c14b3acd37b3a673c553d6293 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/7c20e70113e97a8c14b3acd37b3a673c553d6293/ProdPageTemplates.plug-in.py |
f = urllib.urlopen(url) return f.read() | urllib._urlopener = gfurlo = GUIFancyURLopener() gfurlo._user_prompt = props['name'] gfurlo._passwd_prompt = props['passwd'] try: f = urllib.urlopen(url) return f.read() finally: urllib._urlopener = None | def generatePage(self): import urllib url = 'http://%s:%d/%s/source.html'%(self.model.zopeObj.properties['host'], self.model.zopeObj.properties['httpport'], self.model.zopeObj.whole_name()) f = urllib.urlopen(url) return f.read() | 7c20e70113e97a8c14b3acd37b3a673c553d6293 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/7c20e70113e97a8c14b3acd37b3a673c553d6293/ProdPageTemplates.plug-in.py |
from Models import HTMLSupport | def generatePage(self): import urllib url = 'http://%s:%d/%s/source.html'%(self.model.zopeObj.properties['host'], self.model.zopeObj.properties['httpport'], self.model.zopeObj.whole_name()) f = urllib.urlopen(url) return f.read() | 7c20e70113e97a8c14b3acd37b3a673c553d6293 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/7c20e70113e97a8c14b3acd37b3a673c553d6293/ProdPageTemplates.plug-in.py | |
defaultViews = (HTMLSupport.HTMLSourceView,) | defaultViews = (ZopeViews.ZopeDebugHTMLSourceView,) | def generatePage(self): import urllib url = 'http://%s:%d/%s/source.html'%(self.model.zopeObj.properties['host'], self.model.zopeObj.properties['httpport'], self.model.zopeObj.whole_name()) f = urllib.urlopen(url) return f.read() | 7c20e70113e97a8c14b3acd37b3a673c553d6293 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/7c20e70113e97a8c14b3acd37b3a673c553d6293/ProdPageTemplates.plug-in.py |
raise 'Unauthorized', ( 'Authentication header missing or incorrect') | raise Exception, 'Unauthorized: Authentication header missing or incorrect' | def _authenticate(self): h = self.headers if auth_str: s = h.get('authentication') if not s or s.split()[-1] != auth_str: raise 'Unauthorized', ( 'Authentication header missing or incorrect') | 46a21e867ad5726040d8d298ee026820273857cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/46a21e867ad5726040d8d298ee026820273857cb/RemoteServer.py |
def AddToolButtonBmpObject(frame, toolbar, thebitmap, hint, triggermeth, | def AddToolButtonBmpObject(frame, toolbar, thebitmap, hint, triggermeth, | def AddToolButtonBmpObject(frame, toolbar, thebitmap, hint, triggermeth, theToggleBitmap=wxNullBitmap): nId = wxNewId() toolbar.AddTool(nId, thebitmap, theToggleBitmap, shortHelpString = hint) EVT_TOOL(frame, nId, triggermeth) return nId | 3d0e96e6b9667395b87b4979f7431fb614a306ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3d0e96e6b9667395b87b4979f7431fb614a306ad/Utils.py |
def showTip(frame, forceShow = 0): | def showTip(frame, forceShow=0): | def showTip(frame, forceShow = 0): """ Displays tip of the day. Driven from and updates config file """ try: conf = createAndReadConfig('Explorer') except IOError: conf = None showTip, index = (1, 0) else: showTip = conf.getint('tips', 'showonstartup') index = conf.getint('tips', 'tipindex') if showTip or forceShow: ... | 3d0e96e6b9667395b87b4979f7431fb614a306ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3d0e96e6b9667395b87b4979f7431fb614a306ad/Utils.py |
def createAndReadConfig(name, forPlatform = 1): | def createAndReadConfig(name, forPlatform=1): | def createAndReadConfig(name, forPlatform = 1): """ Return an initialised ConfigFile object """ confFile = '%s/%s%s.cfg' % (Preferences.rcPath, name, forPlatform and wx.wxPlatform == '__WXMSW__' and '.msw' \ or forPlatform and '.gtk' or '') if not _sharedConfs.has_key(confFile): conf = ConfigParser() conf.read(confFil... | 3d0e96e6b9667395b87b4979f7431fb614a306ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3d0e96e6b9667395b87b4979f7431fb614a306ad/Utils.py |
confFile = '%s/%s%s.cfg' % (Preferences.rcPath, name, | confFile = os.path.join(Preferences.rcPath, '%s%s.cfg' % (name, | def createAndReadConfig(name, forPlatform = 1): """ Return an initialised ConfigFile object """ confFile = '%s/%s%s.cfg' % (Preferences.rcPath, name, forPlatform and wx.wxPlatform == '__WXMSW__' and '.msw' \ or forPlatform and '.gtk' or '') if not _sharedConfs.has_key(confFile): conf = ConfigParser() conf.read(confFil... | 3d0e96e6b9667395b87b4979f7431fb614a306ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3d0e96e6b9667395b87b4979f7431fb614a306ad/Utils.py |
or forPlatform and '.gtk' or '') | or forPlatform and '.gtk' or '')) | def createAndReadConfig(name, forPlatform = 1): """ Return an initialised ConfigFile object """ confFile = '%s/%s%s.cfg' % (Preferences.rcPath, name, forPlatform and wx.wxPlatform == '__WXMSW__' and '.msw' \ or forPlatform and '.gtk' or '') if not _sharedConfs.has_key(confFile): conf = ConfigParser() conf.read(confFil... | 3d0e96e6b9667395b87b4979f7431fb614a306ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3d0e96e6b9667395b87b4979f7431fb614a306ad/Utils.py |
def getIndentBlock(): if Preferences.STCUseTabs: return '\t' else: return Preferences.STCIndent*' ' | 3d0e96e6b9667395b87b4979f7431fb614a306ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3d0e96e6b9667395b87b4979f7431fb614a306ad/Utils.py | ||
Plugin is skipped silently. | Plugin is skipped silently. | def getIndentBlock(): if Preferences.STCUseTabs: return '\t' else: return Preferences.STCIndent*' ' | 3d0e96e6b9667395b87b4979f7431fb614a306ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3d0e96e6b9667395b87b4979f7431fb614a306ad/Utils.py |
def buildPluginExecList(): if not Preferences.pluginPaths: return [] pluginExecList = [] pluginPathGlobs = [] for ppth in Preferences.pluginPaths: initPluginGlobals = readInitPluginGlobals(ppth) pluginPathGlobs.append( (os.path.join(ppth, '*.plug-in.py'), initPluginGlobals) ) for globPath, initPluginGlobals in plugin... | 3d0e96e6b9667395b87b4979f7431fb614a306ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3d0e96e6b9667395b87b4979f7431fb614a306ad/Utils.py | ||
def buildPluginExecList(): if not Preferences.pluginPaths: return [] pluginExecList = [] pluginPathGlobs = [] for ppth in Preferences.pluginPaths: initPluginGlobals = readInitPluginGlobals(ppth) pluginPathGlobs.append( (os.path.join(ppth, '*.plug-in.py'), initPluginGlobals) ) for globPath, initPluginGlobals in plugin... | 3d0e96e6b9667395b87b4979f7431fb614a306ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3d0e96e6b9667395b87b4979f7431fb614a306ad/Utils.py | ||
pluginFilename = os.path.join(os.path.dirname(globPath), | pluginFilename = os.path.join(os.path.dirname(globPath), | def buildPluginExecList(): if not Preferences.pluginPaths: return [] pluginExecList = [] pluginPathGlobs = [] for ppth in Preferences.pluginPaths: initPluginGlobals = readInitPluginGlobals(ppth) pluginPathGlobs.append( (os.path.join(ppth, '*.plug-in.py'), initPluginGlobals) ) for globPath, initPluginGlobals in plugin... | 3d0e96e6b9667395b87b4979f7431fb614a306ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3d0e96e6b9667395b87b4979f7431fb614a306ad/Utils.py |
disabledPlugins.append(os.path.join(os.path.dirname(globPath), | disabledPlugins.append(os.path.join(os.path.dirname(globPath), | def buildPluginExecList(): if not Preferences.pluginPaths: return [] pluginExecList = [] pluginPathGlobs = [] for ppth in Preferences.pluginPaths: initPluginGlobals = readInitPluginGlobals(ppth) pluginPathGlobs.append( (os.path.join(ppth, '*.plug-in.py'), initPluginGlobals) ) for globPath, initPluginGlobals in plugin... | 3d0e96e6b9667395b87b4979f7431fb614a306ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3d0e96e6b9667395b87b4979f7431fb614a306ad/Utils.py |
pluginExecList.append( (pluginFilename, | pluginExecList.append( (pluginFilename, | def buildPluginExecList(): if not Preferences.pluginPaths: return [] pluginExecList = [] pluginPathGlobs = [] for ppth in Preferences.pluginPaths: initPluginGlobals = readInitPluginGlobals(ppth) pluginPathGlobs.append( (os.path.join(ppth, '*.plug-in.py'), initPluginGlobals) ) for globPath, initPluginGlobals in plugin... | 3d0e96e6b9667395b87b4979f7431fb614a306ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3d0e96e6b9667395b87b4979f7431fb614a306ad/Utils.py |
def buildPluginExecList(): if not Preferences.pluginPaths: return [] pluginExecList = [] pluginPathGlobs = [] for ppth in Preferences.pluginPaths: initPluginGlobals = readInitPluginGlobals(ppth) pluginPathGlobs.append( (os.path.join(ppth, '*.plug-in.py'), initPluginGlobals) ) for globPath, initPluginGlobals in plugin... | 3d0e96e6b9667395b87b4979f7431fb614a306ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3d0e96e6b9667395b87b4979f7431fb614a306ad/Utils.py | ||
def find_dotted_module(name, path=None): import imp segs = string.split(name, '.') while segs: file, filename, desc = imp.find_module(segs[0], path) del segs[0] path = [filename] return file, filename, desc | 3d0e96e6b9667395b87b4979f7431fb614a306ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3d0e96e6b9667395b87b4979f7431fb614a306ad/Utils.py | ||
for i in range(ctrl.GetItemCount()): ctrl.SetItemState(i, 0, SEL_FOC) | if not (ctrl.GetWindowStyleFlag() & wxLC_SINGLE_SEL): for i in range(ctrl.GetItemCount()): ctrl.SetItemState(i, 0, SEL_FOC) | def selectBeforePopup(event): """Ensures the item the mouse is pointing at is selected before a popup. Works with both single-select and multi-select lists.""" ctrl = event.GetEventObject() if isinstance(ctrl, wxListCtrl): n, flags = ctrl.HitTest(event.GetPosition()) if n >= 0: if not ctrl.GetItemState(n, wxLIST_STATE... | dd4ceed1882eba033a58d7f24c2e696c72944b0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/dd4ceed1882eba033a58d7f24c2e696c72944b0f/Utils.py |
def createImage(self, filename, ext): if ext == '.bmp': | 75d62c83c797cc20e701ee678079c2d41ea5aba0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/75d62c83c797cc20e701ee678079c2d41ea5aba0/ImageStore.py | ||
if ext == '.jpg': return wx.wxImage(filename, wx.wxBITMAP_TYPE_JPG).ConvertToBitmap() | elif ext == '.jpg': return wx.wxImage(filename, wx.wxBITMAP_TYPE_JPEG).ConvertToBitmap() elif ext == '.gif': return wx.wxImage(filename, wx.wxBITMAP_TYPE_GIF).ConvertToBitmap() | def createImage(self, filename, ext): if ext == '.bmp': | 75d62c83c797cc20e701ee678079c2d41ea5aba0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/75d62c83c797cc20e701ee678079c2d41ea5aba0/ImageStore.py |
print 'ZippedImageStore' | def __init__(self, rootpath, defaultArchive, images = None): print 'ZippedImageStore' ImageStore.__init__(self, rootpath, images) self.archives = {} self.addArchive(defaultArchive) | 75d62c83c797cc20e701ee678079c2d41ea5aba0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/75d62c83c797cc20e701ee678079c2d41ea5aba0/ImageStore.py | |
tmpname = tempfile.mktemp() open(tmpname, 'w').write(zf.read(img)) | def addArchive(self, defaultArchive): import zipfile, tempfile zf = zipfile.ZipFile(path.join(self.rootpath, defaultArchive)) self.archives[defaultArchive] = map(lambda fl: fl.filename, zf.filelist) | 75d62c83c797cc20e701ee678079c2d41ea5aba0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/75d62c83c797cc20e701ee678079c2d41ea5aba0/ImageStore.py | |
except: print 'Ext not handled', bmpPath | except Exception, error: print 'Ext not handled', bmpPath, str(error) | def addArchive(self, defaultArchive): import zipfile, tempfile zf = zipfile.ZipFile(path.join(self.rootpath, defaultArchive)) self.archives[defaultArchive] = map(lambda fl: fl.filename, zf.filelist) | 75d62c83c797cc20e701ee678079c2d41ea5aba0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/75d62c83c797cc20e701ee678079c2d41ea5aba0/ImageStore.py |
commonDefs = eval(cfg.Read(commonDefsFile)) | commonDefs = readPyValFromConfig(cfg, commonDefsFile) | def initFromConfig(configFile, lang): cfg = wxFileConfig(localFilename=configFile, style=wxCONFIG_USE_LOCAL_FILE) cfg.SetExpandEnvVars(false) # read in all group names for this language groupPrefix = 'style.%s'%lang gpLen = len(groupPrefix) predefStyleGroupNames, otherLangStyleGroupNames = [], [] cont, val, idx = cfg.... | 44b2e06aa783edb8e94a97a152c4949f8c1b0b78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/44b2e06aa783edb8e94a97a152c4949f8c1b0b78/STCStyleEditor.py |
commonStyleIdNames = eval(cfg.Read('common.styleidnames')) | commonStyleIdNames = readPyValFromConfig(cfg, 'common.styleidnames') | def initFromConfig(configFile, lang): cfg = wxFileConfig(localFilename=configFile, style=wxCONFIG_USE_LOCAL_FILE) cfg.SetExpandEnvVars(false) # read in all group names for this language groupPrefix = 'style.%s'%lang gpLen = len(groupPrefix) predefStyleGroupNames, otherLangStyleGroupNames = [], [] cont, val, idx = cfg.... | 44b2e06aa783edb8e94a97a152c4949f8c1b0b78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/44b2e06aa783edb8e94a97a152c4949f8c1b0b78/STCStyleEditor.py |
styleIdNames = eval(cfg.Read('styleidnames')) | styleIdNames = readPyValFromConfig(cfg, 'styleidnames') | def initFromConfig(configFile, lang): cfg = wxFileConfig(localFilename=configFile, style=wxCONFIG_USE_LOCAL_FILE) cfg.SetExpandEnvVars(false) # read in all group names for this language groupPrefix = 'style.%s'%lang gpLen = len(groupPrefix) predefStyleGroupNames, otherLangStyleGroupNames = [], [] cont, val, idx = cfg.... | 44b2e06aa783edb8e94a97a152c4949f8c1b0b78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/44b2e06aa783edb8e94a97a152c4949f8c1b0b78/STCStyleEditor.py |
braceInfo = eval(cfg.Read('braces')) | braceInfo = readPyValFromConfig(cfg, 'braces') | def initFromConfig(configFile, lang): cfg = wxFileConfig(localFilename=configFile, style=wxCONFIG_USE_LOCAL_FILE) cfg.SetExpandEnvVars(false) # read in all group names for this language groupPrefix = 'style.%s'%lang gpLen = len(groupPrefix) predefStyleGroupNames, otherLangStyleGroupNames = [], [] cont, val, idx = cfg.... | 44b2e06aa783edb8e94a97a152c4949f8c1b0b78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/44b2e06aa783edb8e94a97a152c4949f8c1b0b78/STCStyleEditor.py |
lexer = eval(cfg.Read('lexer')) | lexer = readPyValFromConfig(cfg, 'lexer') | def initFromConfig(configFile, lang): cfg = wxFileConfig(localFilename=configFile, style=wxCONFIG_USE_LOCAL_FILE) cfg.SetExpandEnvVars(false) # read in all group names for this language groupPrefix = 'style.%s'%lang gpLen = len(groupPrefix) predefStyleGroupNames, otherLangStyleGroupNames = [], [] cont, val, idx = cfg.... | 44b2e06aa783edb8e94a97a152c4949f8c1b0b78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/44b2e06aa783edb8e94a97a152c4949f8c1b0b78/STCStyleEditor.py |
self.paletteToolbar.DeleteTool(self.toolIdx) | print self.paletteToolbar.DeleteTool(self.toolIdx) self.paletteToolbar.Realize() | def OnCloseWindow(self, event): if self.paletteToolbar: self.paletteToolbar.DeleteTool(self.toolIdx) | aec7e68d5c9d2ddf361de9fab46e4391c3dab86f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/aec7e68d5c9d2ddf361de9fab46e4391c3dab86f/Help.py |
def OnFindFocus(self, event): self.searchCtrl.SetFocus() def OnCloseHelp(self, event): self.Close() | def OnSelect(self, event): print 'select' self.Show(true) if self.IsIconized(): self.Iconize(false) self.Raise() | aec7e68d5c9d2ddf361de9fab46e4391c3dab86f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/aec7e68d5c9d2ddf361de9fab46e4391c3dab86f/Help.py | |
self.invokeOnServer('exit_debugger') | def call_exit(server=server): try: server.exit_debugger() except socket.error: pass self.taskHandler.addTask(call_exit) | def kill(self): server = self.server if server is not None: self.invokeOnServer('exit_debugger') self.server = None self.input_stream = None self.error_stream = None process = self.process self.process = None if process is not None: # process.Detach() if KEEP_STREAMS_OPEN: process.CloseOutput() | b70f175b273f0d813e1b7ddf26a6a56bfa4820a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/b70f175b273f0d813e1b7ddf26a6a56bfa4820a3/ChildProcessClient.py |
self.view.model.editor.setStatus('Search aborted') | def findInFiles(self): names = [] pattern = self.findTxt.GetValue() bRecursive = self.chkRecursiveSearch.GetValue() file_filter = string.split(self.cmbFileFilter.GetValue(), ';') folder = [self.cmbFolder.GetValue()] self.engine.addFolder(folder[0]) self.engine.addSuffix(self.cmbFileFilter.GetValue()) dlg = wxProgressDi... | 8e1456813c5f89727fad062ed58e8679f7dc3831 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/8e1456813c5f89727fad062ed58e8679f7dc3831/FindReplaceDlg.py | |
maxRow = 0 maxCol = 0 | maxRows = 0 maxCols = 0 | def getNumRowsCols(self, childCompanion): maxRow = 0 maxCol = 0 for si in self.control.GetChildren(): (sipr, sipc), (sisr, sisc) = si.GetPos(), si.GetSpan() if sipr + sisr -1 > maxRow: maxRow = sipr + sisr -1 if sipc + sisc -1 > maxCol: maxCol = sipc + sisc -1 return maxRows, maxCols | fa51625e08d63fab85e7c6947d06c3d9e892317c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/fa51625e08d63fab85e7c6947d06c3d9e892317c/SizerCompanions.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.