rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
openuri = os.path.join(uri, catFile) | if uri.startswith('zip://') and uri.endswith('.zip'): openuri = uri +'://'+ catFile else: openuri = os.path.join(uri, catFile) | def openAndHandleCategoryErrors(self, uri, catFile=''): if catFile: openuri = os.path.join(uri, catFile) else: openuri = uri |
from Explorers import FTPExplorer | from Explorers import FTPExplorer, ZipExplorer ExplorerNodes.fileOpenDlgProtReg.append('zip') | def OnFDEndLabelEdit(self, event): newText = event.GetText() event.Skip() if newText != self.oldLabelVal:# and isinstance(self.list.node, ZopeItemNode): self.node.renameItem(self.oldLabelVal, newText) self.refreshCurrent() self.selectItemNamed(newText) self.EnsureVisible(self.selected) |
dlg = wxBoaFileDialog(None, defaultDir='recent.files://', wildcard='BoaFiles') | dlg = wxBoaFileDialog(None, defaultDir='zip://k:\\dev\\cvsfiles\\boa\\var\\archive2.zip', wildcard='BoaFiles') | def OnFDEndLabelEdit(self, event): newText = event.GetText() event.Skip() if newText != self.oldLabelVal:# and isinstance(self.list.node, ZopeItemNode): self.node.renameItem(self.oldLabelVal, newText) self.refreshCurrent() self.selectItemNamed(newText) self.EnsureVisible(self.selected) |
self._ds.stopAnywhere() if self._ds.isRunning(): self._callNoWait('set_quit', 1) | self._callNoWait('set_quit', 1) | def set_quit(self): """Quits debugging, executing only the try/finally handlers. Non-blocking and immediate. """ self._ds.stopAnywhere() if self._ds.isRunning(): self._callNoWait('set_quit', 1) |
if not full_speed: sys.settrace(self.trace_dispatch) | def set_continue(self, full_speed=0): # Only stop at breakpoints, exceptions or when finished self.stopframe = () self.returnframe = None self.quitting = 0 | |
return str(v) | import traceback return ''.join(traceback.format_exception_only(t, v)) | def pprintVarValue(self, expr, frameno): query_frame = self.getQueryFrame(frameno) if query_frame is None: return '' else: try: v = eval(expr, query_frame.f_globals, query_frame.f_locals) return pprint.pformat(v) except: t, v = sys.exc_info()[:2] return str(v) |
def dispatch_return(self, frame, arg): Bdb.dispatch_return(self, frame, arg) | def dispatch_return(self, frame, arg): Bdb.dispatch_return(self, frame, arg) # XXX this can be used as a hook to detect when a debugging session is # XXX about to stop. frame.f_back will be None # XXX For the main thread this means the end of the program, but # XXX for threads I want to transfer control (tracing) back ... | |
if isPythonScriptMetaType(filename): | if isAPythonScriptMetaType(filename): | def getFilenameAndLine(self, frame): """Returns the filename and line number for the frame. Invoked often. |
if code.co_name == 'interpret': | if code.co_name == 'interpret' and isATALInterpeterFrame(frame): | def getFilenameAndLine(self, frame): """Returns the filename and line number for the frame. Invoked often. |
if frame.f_globals.get('__name__') == TAL_INTERP_MODULE_NAME: caller = frame.f_back if caller.f_globals.get('__name__') == TAL_INTERP_MODULE_NAME: caller_name = caller.f_code.co_name source_file = None position = None if caller_name in ('do_useMacro', 'do_defineSlot'): source_file = caller.f_locals.get('saved_source... | se = self.stack_extra if se: info = se.get(frame, None) if info: source_file, lineno = info return source_file, lineno interp = frame.f_locals.get('self', None) source_file = interp.sourceFile position = interp.position if position: lineno = position[0] or 0 else: lineno = 0 return source_file, lineno | def getTALPosition(self, frame): """If the frame is in TALInterpreter.interpret(), detects what template was being interpreted and where, but only for specific interpreter frames. Returns the source file and line number. """ # Get TAL frames. XXX brittle in many ways. if frame.f_globals.get('__name__') == TAL_INTERP_... |
if frame.f_code.co_name == 'interpret': | if isATALInterpeterFrame(frame): | def getFrameNames(self, frame): """Returns the module and function name for the frame. """ if frame.f_code.co_name == 'interpret': source_file, ln = self.getTALPosition(frame) if source_file: return '', source_file.split('/')[-1] try: modname = frame.f_globals['__name__'] except KeyError: modname = '' funcname = frame.... |
try: modname = frame.f_globals['__name__'] except KeyError: modname = '' funcname = frame.f_code.co_name return modname, funcname | return DebugServer.getFrameNames(self, frame) | def getFrameNames(self, frame): """Returns the module and function name for the frame. """ if frame.f_code.co_name == 'interpret': source_file, ln = self.getTALPosition(frame) if source_file: return '', source_file.split('/')[-1] try: modname = frame.f_globals['__name__'] except KeyError: modname = '' funcname = frame.... |
if isPythonScriptMetaType(code.co_filename): | if isAPythonScriptMetaType(code.co_filename): | def isTraceable(self, frame): """Indicates whether the debugger should step into the given frame. |
code = frame.f_code if isPythonScriptMetaType(code.co_filename): | if isAPythonScriptMetaType(frame.f_code.co_filename): | def isAScriptFrame(self, frame): """Indicates whether the given frame is a high-level script frame. """ code = frame.f_code if isPythonScriptMetaType(code.co_filename): return 1 if code.co_name == 'interpret': source_file, ln = self.getTALPosition(frame) if source_file: return 1 return 0 |
if code.co_name == 'interpret': source_file, ln = self.getTALPosition(frame) if source_file: return 1 | if isATALInterpeterFrame(frame): return 1 | def isAScriptFrame(self, frame): """Indicates whether the given frame is a high-level script frame. """ code = frame.f_code if isPythonScriptMetaType(code.co_filename): return 1 if code.co_name == 'interpret': source_file, ln = self.getTALPosition(frame) if source_file: return 1 return 0 |
code = frame.f_code if code.co_name == 'interpret': source_file, ln = self.getTALPosition(frame) if source_file: interp = frame.f_locals.get('self') if interp is not None: local_vars = getattr(interp.engine, 'local_vars', {}) global_vars = getattr(interp.engine, 'global_vars', {}) return global_vars, local_vars | if isATALInterpeterFrame(frame): interp = frame.f_locals.get('self') if interp is not None: local_vars = getattr(interp.engine, 'local_vars', {}) global_vars = getattr(interp.engine, 'global_vars', {}) return global_vars, local_vars | def getFrameNamespaces(self, frame): """Returns the locals and globals for a frame. """ code = frame.f_code if code.co_name == 'interpret': source_file, ln = self.getTALPosition(frame) if source_file: # This is a TAL interpret() frame. Use special locals # and globals. interp = frame.f_locals.get('self') if interp is ... |
wxID_FSFILTER, wxID_FSFILTERINTMODULES ) = map(lambda x: wxNewId(), range(10)) | wxID_FSFILTER, wxID_FSFILTERINTMODULES, wxID_FSFINDINFILES, wxID_FSFINDFILES, ) = map(lambda x: wxNewId(), range(12)) | def renameItem(self, name, newName): if self.entries.has_key(newName): raise Exception, 'Name exists' self.entries[newName] = newName del self.entries[name] self.updateConfig() |
(wxID_FSBOOKMARK, 'Find', self.OnFindFSItem, self.findBmp), | (wxID_FSFINDINFILES, 'Find', self.OnFindFSItem, self.findBmp), | def __init__(self, editor, list, cvsController = None): ExplorerNodes.Controller.__init__(self, editor) ExplorerNodes.ClipboardControllerMix.__init__(self) self.editor = editor |
transport = Explorer.openEx(contents) | def __init__(self, data, name, editor, saved): EditorModels.SourceModel.__init__(self, data, name, editor, saved) | |
transport = Explorer.openEx(indexes) | def __init__(self, data, name, editor, saved): EditorModels.SourceModel.__init__(self, data, name, editor, saved) | |
print k, v, q | def __call__(self,*args,**kw): method=self.method if method=='PUT' and len(args)==1 and not kw: query=[args[0]] args=() else: query=[] for i in range(len(args)): try: k=self.args[i] if kw.has_key(k): raise TypeError, 'Keyword arg redefined' kw[k]=args[i] except IndexError: raise TypeError, 'Too many arguments' | |
sock.connect(self.host,self.port) | sock.connect( (self.host,self.port) ) | def _mp_call(self,kw, type2suffix={ type(1.0): ':float', type(1): ':int', type(1L): ':long', type([]): ':list', type(()): ':tuple', } ): # Call a function using the file-upload protcol |
self.m = is_constr.search(line) | self.m = is_constr_factory.search(line) | def __init__(self, line=None, comp_name='', class_name='', params=None): self.comp_name = comp_name self.class_name = class_name if params is None: self.params = {} else: self.params = params self.factory = None |
self.class_name = self.m.group('class') | self.class_name = '' self.factory = (self.m.group('factory'), self.m.group('method')) | def __init__(self, line=None, comp_name='', class_name='', params=None): self.comp_name = comp_name self.class_name = class_name if params is None: self.params = {} else: self.params = params self.factory = None |
self.m = is_constr_frm.search(line) | self.m = is_constr.search(line) | def __init__(self, line=None, comp_name='', class_name='', params=None): self.comp_name = comp_name self.class_name = class_name if params is None: self.params = {} else: self.params = params self.factory = None |
self.comp_name = '' | self.comp_name = self.m.group('name') | def __init__(self, line=None, comp_name='', class_name='', params=None): self.comp_name = comp_name self.class_name = class_name if params is None: self.params = {} else: self.params = params self.factory = None |
self.m = is_constr_factory.search(line) | self.m = is_constr_frm.search(line) | def __init__(self, line=None, comp_name='', class_name='', params=None): self.comp_name = comp_name self.class_name = class_name if params is None: self.params = {} else: self.params = params self.factory = None |
self.comp_name = self.m.group('name') self.class_name = '' self.factory = (self.m.group('factory'), self.m.group('method')) | self.comp_name = '' self.class_name = self.m.group('class') | def __init__(self, line=None, comp_name='', class_name='', params=None): self.comp_name = comp_name self.class_name = class_name if params is None: self.params = {} else: self.params = params self.factory = None |
print 'MR shown' | def checkError(self, err, caption, out = None): if err or out: self.esf.updateCtrls(err, out) self.esf.Show(true) print 'MR shown' return self.esf else: return None | |
dlg = ProcessProgressDlg.ProcessProgressDlg(self.editor, cmd, 'Execute module') | dlg = ProcessProgressDlg.ProcessProgressDlg(None, cmd, 'Execute module') | def run(self, cmd): import ProcessProgressDlg, ErrorStack dlg = ProcessProgressDlg.ProcessProgressDlg(self.editor, cmd, 'Execute module') try: dlg.ShowModal() serr = ErrorStack.buildErrorList(dlg.errors) if len(serr): return self.checkError(serr, 'Ran', dlg.output) else: return None |
print l, | def run(self, cmd): from popen2import import popen3 import ErrorStack inp, outp, errp = popen3(cmd) | |
compn, ctrl = self.controllerView.objects[ctrlName][:2] sizer = self.objects[Utils.ctrlNameFromSrcRef(prop.params[0])][1] compn.SetSizer(sizer) self.sizerConnectList.append(prop) | if prop.prop_setter == 'SetSizer': compn, ctrl = self.controllerView.objects[ctrlName][:2] sizer = self.objects[Utils.ctrlNameFromSrcRef(prop.params[0])][1] compn.SetSizer(sizer) self.sizerConnectList.append(prop) | def initObjectsAndCompanions(self, creators, objColl, dependents, depLinks): DataView.initObjectsAndCompanions(self, creators, objColl, dependents, depLinks) |
EventCollections.EventCategories['DatePickerCtrlEvent'] = ('wx.EVT_DATE_CHANGED') | EventCollections.EventCategories['DatePickerCtrlEvent'] = ('wx.EVT_DATE_CHANGED',) | def inspectorEdit(self): if self.value.IsValid(): PropertyEditors.BITPropEditor.inspectorEdit(self) |
except NameError: | except AttributeError: | def events(self): return BaseCompanions.WindowDTC.events(self) + ['DatePickerCtrlEvent'] |
locals = codeBlock.localnames() if name in locals: | if name in codeBlock.locals: | def getNameSig(self, name, method, module, codeBlock=None): if codeBlock: locals = codeBlock.localnames() if name in locals: objType = codeBlock.locals[name].objtype res = self.getTypeSig(objType, method, module) if res is not None: return res if name in module.globals: objType = module.globals[name].signature res = se... |
locals = codeBlock.localnames() if name in locals: | if name in codeBlock.locals: | def getNameAttribs(self, name, module, codeBlock=None): if codeBlock: locals = codeBlock.localnames() if name in locals: objType = codeBlock.locals[name].objtype res = self.getTypeAttribs(objType, module) if res is not None: return res if name in module.globals: objType = module.globals[name].signature res = self.getTy... |
if idx < self.idx: | if idx <= self.idx: | def checkRemoval(self, modPage): for page in self.pages[:]: if page.modulePage == modPage: idx = self.pages.index(page) if idx < self.idx: self.idx = self.idx - 1 del self.pages[idx] |
'validator': 'wxDefaultValidator', | def designTimeSource(self, position = 'wxDefaultPosition', size = 'wxDefaultSize'): return {'pos': position, 'size': size, 'style': 'wxLC_ICON', 'validator': 'wxDefaultValidator', 'name': `self.name`} | |
self.names = {'Format': formatStyle} | def __init__(self, name, designer, parentCompanion, ctrl): CollectionDTC.__init__(self, name, designer, parentCompanion, ctrl) self.editors = {'Width': IntConstrPropEdit, 'Heading': StrConstrPropEdit, 'Format': EnumConstrPropEdit}#StyleConstrPropEdit} | |
'validator': 'wxDefaultValidator', | def designTimeSource(self, position = 'wxDefaultPosition', size = 'wxDefaultSize'): return {'pos': position, 'size': size, 'style': 'wxTR_HAS_BUTTONS', 'validator': 'wxDefaultValidator', 'name': `self.name`} | |
'validator': 'wxDefaultValidator', | def designTimeSource(self, position = 'wxDefaultPosition', size = 'wxDefaultSize'): return {'pos': position, 'size': size, 'choices': '[]', 'style': '0', 'validator': 'wxDefaultValidator', 'name': `self.name`} | |
'Style': 'style', 'Validator': 'validator', 'Name': 'name'} | 'Style': 'style', 'Name': 'name'} | def constructor(self): return {'Label': 'label', 'Position': 'point', 'Size': 'size', 'Choices': 'choices', 'MajorDimension': 'majorDimension', 'Style': 'style', 'Validator': 'validator', 'Name': 'name'} |
'validator': 'wxDefaultValidator', | def designTimeSource(self, position = 'wxDefaultPosition', size = 'wxDefaultSize'): return {'label': `self.name`, 'point': position, 'size': size, 'choices': `['asd']`, 'majorDimension': '1', 'style': 'wxRA_SPECIFY_COLS', 'validator': 'wxDefaultValidator', 'name': `self.name`} | |
if event.GetId() == dsgn.GetId() and dsgn.selection: dsgn.selection.selectCtrl(dsgn, dsgn.companion) | if event.GetId() == dsgn.GetId(): if dsgn.selection: dsgn.selection.selectCtrl(dsgn, dsgn.companion) elif dsgn.multiSelection: dsgn.clearMultiSelection() dsgn.assureSingleSelection() dsgn.selection.selectCtrl(dsgn, dsgn.companion) return | def OnControlResize(self, event): """ Control is resized, emulate native wxWindows layout behaviour """ dsgn = self.designer try: if event.GetId() == dsgn.GetId() and dsgn.selection: dsgn.selection.selectCtrl(dsgn, dsgn.companion) |
if self.selection: self.selection.selectNone() | if self.selection: self.selection.selectNone() self.selection = None elif self.multiSelection: for sel in self.multiSelection: sel.selectNone() sel.destroy() self.multiSelection = [] | def selectNone(self): if self.selection: self.selection.selectNone() |
pos = wxPoint(SelectionTags.granularise(pos.x), SelectionTags.granularise(pos.y)) | def selectControlByPos(self, ctrl, pos, multiSelect): """ Handle selection of a control from a users click of creation of a new one if a component was selected on the palette. Some ctrls do not register clicks, the click is then picked up from the parent which checks if a click intersects any child regions. For effici... | |
for y in range(sze.y / sg): for x in range(sze.x / sg): | for y in range(sze.y / sg + 1): for x in range(sze.x / sg + 1): | def drawGrid_dots(self, dc, sze, sg): pen1 = wxPen(wxNamedColour('BLACK')) dc.SetPen(pen1) for y in range(sze.y / sg): for x in range(sze.x / sg): dc.DrawPoint(x * sg, y * sg) |
sel = self.selection if sel and sel.selection != self: sel.position.x = sel.position.x - 1 sel.startPos.x = sel.startPos.x - 1 sel.resizeCtrl() sel.setSelection() | for sel in self.getSelAsList(): if sel.selection != self: sel.position.x = sel.position.x - 1 sel.startPos.x = sel.startPos.x - 1 self.moveUpdate(sel) | def OnMoveLeft(self, event): sel = self.selection if sel and sel.selection != self: sel.position.x = sel.position.x - 1 sel.startPos.x = sel.startPos.x - 1 sel.resizeCtrl() sel.setSelection() |
sel = self.selection if sel and sel.selection != self: sel.position.x = sel.position.x + 1 sel.startPos.x = sel.startPos.x + 1 sel.resizeCtrl() sel.setSelection() | for sel in self.getSelAsList(): if sel.selection != self: sel.position.x = sel.position.x + 1 sel.startPos.x = sel.startPos.x + 1 self.moveUpdate(sel) | def OnMoveRight(self, event): sel = self.selection if sel and sel.selection != self: sel.position.x = sel.position.x + 1 sel.startPos.x = sel.startPos.x + 1 sel.resizeCtrl() sel.setSelection() |
sel = self.selection if sel and sel.selection != self: sel.position.y = sel.position.y - 1 sel.startPos.y = sel.startPos.y - 1 sel.resizeCtrl() sel.setSelection() def OnMoveDown(self, event): sel = self.selection if sel and sel.selection != self: sel.position.y = sel.position.y + 1 sel.startPos.y = sel.startPos.y + 1 s... | for sel in self.getSelAsList(): if sel.selection != self: sel.position.y = sel.position.y - 1 sel.startPos.y = sel.startPos.y - 1 self.moveUpdate(sel) def OnMoveDown(self, event): for sel in self.getSelAsList(): if sel.selection != self: sel.position.y = sel.position.y + 1 sel.startPos.y = sel.startPos.y + 1 self.moveU... | def OnMoveUp(self, event): sel = self.selection if sel and sel.selection != self: sel.position.y = sel.position.y - 1 sel.startPos.y = sel.startPos.y - 1 sel.resizeCtrl() sel.setSelection() |
sel.resizeCtrl() sel.setSelection() | self.sizeUpdate(sel) | def OnWidthInc(self, event): sel = self.selection if sel and sel.selection != self: sel.size.x = sel.size.x + 1 sel.startSize.x = sel.startSize.x + 1 sel.resizeCtrl() sel.setSelection() |
sel = self.selection if sel and sel.selection != self: | sel = self.selection if sel and sel.selection != self and sel.size.x > 0: | def OnWidthDec(self, event): sel = self.selection if sel and sel.selection != self: sel.size.x = sel.size.x - 1 sel.startSize.x = sel.startSize.x - 1 sel.resizeCtrl() sel.setSelection() |
sel.resizeCtrl() sel.setSelection() | self.sizeUpdate(sel) | def OnWidthDec(self, event): sel = self.selection if sel and sel.selection != self: sel.size.x = sel.size.x - 1 sel.startSize.x = sel.startSize.x - 1 sel.resizeCtrl() sel.setSelection() |
sel.resizeCtrl() sel.setSelection() | self.sizeUpdate(sel) | def OnHeightInc(self, event): sel = self.selection if sel and sel.selection != self: sel.size.y = sel.size.y + 1 sel.startSize.y = sel.startSize.y + 1 sel.resizeCtrl() sel.setSelection() |
idx1 = self.il.Add(PaletteMapping.bitmapForComponent(classObj)) | idx1 = self.il.Add(PaletteStore.bitmapForComponent(classObj)) | def refreshCtrl(self): #if self.opened: return |
idx1 = self.il.Add(PaletteMapping.bitmapForComponent(className, base)) | idx1 = self.il.Add(PaletteStore.bitmapForComponent(className, base)) | def refreshCtrl(self): #if self.opened: return |
idx1 = self.il.Add(PaletteMapping.bitmapForComponent(className, 'Component')) | idx1 = self.il.Add(PaletteStore.bitmapForComponent(className, 'Component')) | def refreshCtrl(self): #if self.opened: return |
if wxPlatform == '__WXGTK__': wxLogWarning('GTK only allows connecting the wxMenuBar once to the wxFrame') | def notification(self, compn, action): ContainerDTC.notification(self, compn, action) if action == 'delete': # StatusBar sb = self.control.GetStatusBar() | |
self.control.SetMenuBar(None) | if wxPlatform != '__WXGTK__': self.control.SetMenuBar(None) | def updatePosAndSize(self): ContainerDTC.updatePosAndSize(self) # Argh, this is needed so that ClientSize is up to date # XXX Delete links to frame bars so client size is accurate self.control.SetToolBar(None) self.control.SetStatusBar(None) self.control.SetMenuBar(None) if self.textPropList: for prop in self.textPropL... |
wxLayoutAlgorithm().LayoutWindow(self.control) | def defaultAction(self): self.control.SetDefaultSize(self.control.GetSize()) wxLayoutAlgorithm().LayoutWindow(self.control.GetParent()) | def SetDefaultSize(self, size): if self.control: self.control.SetSize(size) wxLayoutAlgorithm().LayoutWindow(self.control) |
if `self.control.GetTargetWindow()` == `compn.control`: | if self.control.GetTargetWindow() == compn.control: | def notification(self, compn, action): ContainerDTC.notification(self, compn, action) if action == 'delete': if `self.control.GetTargetWindow()` == `compn.control`: self.propRevertToDefault('TargetWindow', 'SetTargetWindow') self.control.SetTargetWindow(self.control) |
if `self.control.GetImageList()` == `compn.control`: | if self.control.GetImageList() == compn.control: | def notification(self, compn, action): ContainerDTC.notification(self, compn, action) if action == 'delete': if `self.control.GetImageList()` == `compn.control`: self.propRevertToDefault('ImageList', 'SetImageList') self.control.SetImageList(None) |
def writeCollectionItems(self, output): CollectionDTC.writeCollectionItems(self, output) | def writeCollectionItems(self, output, stripFrmId=''): CollectionDTC.writeCollectionItems(self, output, stripFrmId) | def writeCollectionItems(self, output): CollectionDTC.writeCollectionItems(self, output) warn = 0 for constr in self.textConstrLst: if constr.params['pPage'] == 'None': wxLogWarning('No control for %s, page %s'%( self.parentCompanion.name, constr.params['strText'])) warn = 1 if warn: wxLogWarning('The red-dashed area o... |
win1, win2, sashPos = self.GetWindow1(None), self.GetWindow2(None), `self.control.GetSashPosition()` | win1, win2 = self.GetWindow1(None), self.GetWindow2(None) sashPos = `self.control.GetSashPosition()` | def persistProp(self, name, setterName, value): """ When attempting to persist the Window properties and the SplitMode property, add, or update a previously defined SplitVertically or SplitHorizontally method.""" |
pass | def events(self): return ListBoxDTC.events(self) + ['CheckListBoxEvent'] | def defaultAction(self): insp = self.designer.inspector insp.pages.SetSelection(2) insp.events.doAddEvent('ListBoxEvent', 'EVT_LISTBOX') |
self.windowStyles = ['wxSB_SIZEGRIP'] + self.windowStyles | self.windowStyles = ['wxST_SIZEGRIP'] + self.windowStyles | def __init__(self, name, designer, parent, ctrlClass): ContainerDTC.__init__(self, name, designer, parent, ctrlClass) self.editors['Fields'] = CollectionPropEdit self.subCompanions['Fields'] = StatusBarFieldsCDTC self.windowStyles = ['wxSB_SIZEGRIP'] + self.windowStyles |
wxPoint(0, Preferences.paletteHeight), | wxPoint(0, Preferences.paletteHeight + Preferences.windowManagerTop + \ Preferences.windowManagerBottom), | def __init__(self, model, stack = None): bdb.Bdb.__init__(self) wxFrame.__init__(self, model.editor, -1, 'Debugger - %s - %s' \ % (path.basename(model.filename), model.filename), wxPoint(0, Preferences.paletteHeight), wxSize(Preferences.inspWidth, Preferences.bottomHeight)) |
self.outp.SetBackgroundColour(wxBLACK) self.outp.SetForegroundColour(wxWHITE) self.outp.SetFont(wxFont(7, wxDEFAULT, wxNORMAL, wxNORMAL, false)) | def __init__(self, model, stack = None): bdb.Bdb.__init__(self) wxFrame.__init__(self, model.editor, -1, 'Debugger - %s - %s' \ % (path.basename(model.filename), model.filename), wxPoint(0, Preferences.paletteHeight), wxSize(Preferences.inspWidth, Preferences.bottomHeight)) | |
return self.toolbar.GetToolState(self.debugBrowseId) | return self.toolbar.GetToolState(self.debugBrowseId) def isInShellNamepace(self): return self.toolbar.GetToolState(self.shellNamespaceId) | def isDebugBrowsing(self): return self.toolbar.GetToolState(self.debugBrowseId) |
def OnDebugNamespace(self, event): print 'OnDebugNamespace', self.isInShellNamepace() | def OnCloseWindow(self, event): try: if self.interacting: # XXX mmm self.OnStop(None) self.locs.destroy() self.globs.destroy() self.breakpts.destroy() self.watches.destroy() self.model.editor.debugger = None | |
Preferences.IS.registerImage('Images/Modules/JavaModule.png', getJavaModuleData()) Preferences.IS.registerImage('Images/Palette/JavaPalette.png', getJavaPaletteData()) | Preferences.IS.registerImage('Images/Modules/Java_s.png', getJavaModuleData()) Preferences.IS.registerImage('Images/Palette/Java.png', getJavaPaletteData()) | def getJavaModuleData(): return \ |
tbs = errout.updateCtrls((), outls, 'CVS Results', '', err) | tbs = errout.updateCtrls((), outls, 'CVS Result', '', err) | def doCvsCmd(self, cmd, cvsDir, stdinput='', cvsOutput='output window'): # Repaint background wxYield() |
'Images/CVSPics/Diff.png'): | 'Images/CvsPics/Diff.png'): | def __init__(self, parent, editor): self.notebookStyle = 0 self.tracebackImgIdx = 0 self.tracebackText = 'Tracebacks' self.outputImgIdx = 1 self.outputText = 'Output' self.errorsImgIdx = 2 self.errorsText = 'Errors' self.diffPage = None self.diffImgIdx = 3 |
aMessage = "Displaying information about " +`len(self._methodList)` +" methods." +`self._working` | aMessage = u"Displaying information about " +`len(self._methodList)` +" methods." +`self._working` | def setStatusTextFieldMessage_(self, aMessage): """ Sets the contents of the statusTextField to aMessage and forces the field's contents to be redisplayed. """ if not aMessage: aMessage = "Displaying information about " +`len(self._methodList)` +" methods." +`self._working` self.statusTextField.performSelectorOnMainThr... |
"setStringValue:", aMessage, YES) | "setStringValue:", unicode(aMessage), 0) | def setStatusTextFieldMessage_(self, aMessage): """ Sets the contents of the statusTextField to aMessage and forces the field's contents to be redisplayed. """ if not aMessage: aMessage = "Displaying information about " +`len(self._methodList)` +" methods." +`self._working` self.statusTextField.performSelectorOnMainThr... |
anc = anchorPattern.search(line[:i+1]) if anc: kol = findMatchingCol(line,anc.start()) c = anc.group(3) if c =="=": if not anc.group(1): return (line, -3) return (anc.group(1), -1) elif c==":": if partOfAllowed(anc.group(1)): return (0,-2) else: if anc.group(2): return (objectPattern.search(line[i:]).group(1), \ anc.st... | anc = anchorPattern.search(line[:i+1]) if anc: kol = findMatchingCol(line,anc.start()) c = anc.group(3) ob = objectPattern.search(line[i:]) if c =="=": if not anc.group(1): return (line, -3) return (anc.group(1), -1) elif c==":": if partOfAllowed(anc.group(1)): | def assigned(line,i): """ finds out if a message is attached to a variable, returns a tuple with variable and position, position will be -1 if attached to varible, -2 if attached to allowed message, if its attached to a colon the position of the colon will be returned, -3 means error""" anc = anchorPattern.search(line[... |
return (objectPattern.search(line[i:]).group(1), line[:anc.end()].rfind(",") ) elif c=="return" or c =="(": a = objectPattern.search(line[i:]) if a: return a.group(1), line[:anc.end()].rfind("return") return "return", i else: if not objectPattern.search(line[i:]): return (line,-3) return objectPattern.search(line[i:]).... | elif ob: if anc.group(2): return (ob.group(1), anc.start() + len(map( anc.group, (1,2,3) ) )) return (ob.group(1), anc.start() + len(map( anc.group, (1,2,3) ) ) ) elif c==",": kol = findMatchingCol(line,line[:anc.end()].rfind(",")) anchor = colAnchorPattern.search(line[:kol+1]) if anchor: if partOfAllowed(anchor.group(... | def assigned(line,i): """ finds out if a message is attached to a variable, returns a tuple with variable and position, position will be -1 if attached to varible, -2 if attached to allowed message, if its attached to a colon the position of the colon will be returned, -3 means error""" anc = anchorPattern.search(line[... |
filename = "/Users/joachimmartensson/Projects/RRSpreadSheet/Source/RRPosition.m" maine(filename) | filelist =GlobDirectoryWalker(".", "*.m") for filename in filelist: if filename.find("Controller.m")==-1: print filename maine(filename) | def dumpProfileStats(): import hotshot.stats global profData print "dump profiling data" stats = hotshot.stats.load(profData) stats.sort_stats("cumulative") stats.print_stats() |
if invalid_decls: | if False in invalid_decls: | def __ensure_attribute( self, name ): invalid_decls = filter( lambda d: not hasattr( d, name ), self.decls ) if invalid_decls: raise RuntimeError( "Not all declarations have '%s' attribute." % name ) |
self.__needs_flushed = bool( self.__cache ) | self.__needs_flushed = not bool( self.__cache ) | def __init__( self, name ): cache_base_t.__init__( self ) self.__name = name self.__cache = self.__load( self.__name ) self.__needs_flushed = bool( self.__cache ) # If empty then we need to flush for entry in self.__cache.itervalues(): # Clear hit flags entry.was_hit = False |
if '.' in self.__inst.name or '$' in self.__inst.name: new_name = self.__inst.parent.name if templates.is_instantiation( new_name ): new_name = templates.name( new_name ) self.__inst.name = new_name | if '.' in decl.name or '$' in decl.name: decl.name = new_name | def visit_class(self ): self.__link_members() #GCC-XML sometimes generates constructors with names that does not match #class name. I think this is because those constructors are compiler #generated. I need to find out more about this and to talk with Brad for decl in self.__inst.declarations: if not isinstance( decl, ... |
self.__dict__['decls'] = decls | self.__dict__['declarations'] = decls | def __init__( self, decls ): """@param decls: list of declarations to operate on. @type decls: list of L{declaration wrappers<decl_wrapper_t>} """ object.__init__( self ) self.__dict__['decls'] = decls |
return bool( self.decls ) | return bool( self.declarations ) | def __nonzero__( self ): return bool( self.decls ) |
return len( self.decls ) | return len( self.declarations ) | def __len__( self ): """returns the number of declarations""" return len( self.decls ) |
return self.decls[index] | return self.declarations[index] | def __getitem__( self, index ): """provides access to declaration""" return self.decls[index] |
return iter(self.decls) | return iter(self.declarations) | def __iter__( self ): return iter(self.decls) |
invalid_decls = filter( lambda d: not hasattr( d, name ), self.decls ) if False in invalid_decls: | invalid_decls = filter( lambda d: not hasattr( d, name ), self.declarations ) if invalid_decls: | def __ensure_attribute( self, name ): invalid_decls = filter( lambda d: not hasattr( d, name ), self.decls ) if False in invalid_decls: raise RuntimeError( "Not all declarations have '%s' attribute." % name ) |
for d in self.decls: | for d in self.declarations: | def __setattr__( self, name, value ): """Updates the value of attribute on all declarations. @param name: name of attribute @param value: new value of attribute """ self.__ensure_attribute( name ) for d in self.decls: setattr( d, name, value ) |
return call_redirector_t( name, self.decls ) | return call_redirector_t( name, self.declarations ) | def __getattr__( self, name ): """@param name: name of method """ return call_redirector_t( name, self.decls ) |
items = [ self._sorted_list( self.arguments ) | items = [ self.arguments | def _get__cmp__items( self ): """implementation details""" items = [ self._sorted_list( self.arguments ) , self.return_type , self.has_extern , self._sorted_list( self.exceptions ) ] items.extend( self._get__cmp__call_items() ) return items |
def _set_arguments(self, arguments): self._arguments = arguments arguments = property( _get_arguments, _set_arguments | arguments = property( _get_arguments | def _set_arguments(self, arguments): self._arguments = arguments |
utils.logger.info( 'running query: %s and <user defined function>' % str( matcher ) ) | utils.logger.debug( 'running query: %s and <user defined function>' % str( matcher ) ) | def __create_matcher( self, match_class, **keywds ): matcher_args = keywds.copy() del matcher_args['function'] del matcher_args['recursive'] if matcher_args.has_key('allow_empty'): del matcher_args['allow_empty'] |
utils.logger.info( 'running query: %s' % str( matcher ) ) | utils.logger.debug( 'running query: %s' % str( matcher ) ) | def __create_matcher( self, match_class, **keywds ): matcher_args = keywds.copy() del matcher_args['function'] del matcher_args['recursive'] if matcher_args.has_key('allow_empty'): del matcher_args['allow_empty'] |
utils.logger.info( 'running non optimized query - optimization has not been done' ) | utils.logger.debug( 'running non optimized query - optimization has not been done' ) | def __findout_range( self, name, decl_type, recursive ): if not self._optimized: utils.logger.info( 'running non optimized query - optimization has not been done' ) decls = self.declarations if recursive: decls = algorithm.make_flatten( self.declarations ) return decls |
utils.logger.info( 'query has been optimized on type and name' ) | utils.logger.debug( 'query has been optimized on type and name' ) | def __findout_range( self, name, decl_type, recursive ): if not self._optimized: utils.logger.info( 'running non optimized query - optimization has not been done' ) decls = self.declarations if recursive: decls = algorithm.make_flatten( self.declarations ) return decls |
utils.logger.info( 'non recursive query has been optimized on type and name' ) | utils.logger.debug( 'non recursive query has been optimized on type and name' ) | def __findout_range( self, name, decl_type, recursive ): if not self._optimized: utils.logger.info( 'running non optimized query - optimization has not been done' ) decls = self.declarations if recursive: decls = algorithm.make_flatten( self.declarations ) return decls |
utils.logger.info( 'query has been optimized on type' ) | utils.logger.debug( 'query has been optimized on type' ) | def __findout_range( self, name, decl_type, recursive ): if not self._optimized: utils.logger.info( 'running non optimized query - optimization has not been done' ) decls = self.declarations if recursive: decls = algorithm.make_flatten( self.declarations ) return decls |
utils.logger.info( 'non recursive query has been optimized on type' ) | utils.logger.debug( 'non recursive query has been optimized on type' ) | def __findout_range( self, name, decl_type, recursive ): if not self._optimized: utils.logger.info( 'running non optimized query - optimization has not been done' ) decls = self.declarations if recursive: decls = algorithm.make_flatten( self.declarations ) return decls |
utils.logger.info( 'query has not been optimized ( hint: query does not contain type and/or name )' ) | utils.logger.debug( 'query has not been optimized ( hint: query does not contain type and/or name )' ) | def __findout_range( self, name, decl_type, recursive ): if not self._optimized: utils.logger.info( 'running non optimized query - optimization has not been done' ) decls = self.declarations if recursive: decls = algorithm.make_flatten( self.declarations ) return decls |
utils.logger.info( 'non recursive query has not been optimized ( hint: query does not contain type and/or name )' ) | utils.logger.debug( 'non recursive query has not been optimized ( hint: query does not contain type and/or name )' ) | def __findout_range( self, name, decl_type, recursive ): if not self._optimized: utils.logger.info( 'running non optimized query - optimization has not been done' ) decls = self.declarations if recursive: decls = algorithm.make_flatten( self.declarations ) return decls |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.