bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def moduleFilename(self, name): """ Return absolute filename of the given module """ if not self.modules.has_key(name): raise 'No such module in application: '+name
def moduleFilename(self, name): """ Return absolute filename of the given module """ if not self.modules.has_key(name): raise 'No such module in application: '+name
29,400
def openModule(self, name): return self.editor.openOrGotoModule(self.moduleFilename(name), self)
def openModule(self, name): return self.editor.openOrGotoModule(self.moduleFilename(name), self)
29,401
def normaliseModuleRelativeToApp(self, relFilename): """ Normalise relative paths to absolute paths """ if not self.savedAs: return relFilename else: protsplit = self.filename.split('://') if len(protsplit) == 1: prot, appFilename = 'file', self.filename elif len(protsplit) == 2: prot, appFilename = protsplit elif len(...
def normaliseModuleRelativeToApp(self, relFilename): """ Normalise relative paths to absolute paths """ if not self.savedAs or relFilename.startswith('none://'): return relFilename else: protsplit = self.filename.split('://') if len(protsplit) == 1: prot, appFilename = 'file', self.filename elif len(protsplit) == 2: pr...
29,402
def normaliseModuleRelativeToApp(self, relFilename): """ Normalise relative paths to absolute paths """ if not self.savedAs: return relFilename else: protsplit = self.filename.split('://') if len(protsplit) == 1: prot, appFilename = 'file', self.filename elif len(protsplit) == 2: prot, appFilename = protsplit elif len(...
defnormaliseModuleRelativeToApp(self,relFilename):"""Normaliserelativepathstoabsolutepaths"""ifnotself.savedAs:returnrelFilenameelse:protsplit=self.filename.split('://')iflen(protsplit)==1:prot,appFilename='file',self.filenameeliflen(protsplit)==2:prot,appFilename=protspliteliflen(protsplit)==3:prot,archive,appFilename...
29,403
def __init__(self, parent, id, app):
def __init__(self, parent, id, app):
29,404
def OnClick(self, event): self.componentSB.SetStatusText('Palette Click'+`event.GetId()`)
def OnClick(self, event): self.componentSB.SetStatusText('Palette Click'+`event.GetId()`)
29,405
def OnNewClick(self, event): pass
defOnNewClick(self,event):pass
29,406
def OnNewWidget(self, event): pass
def OnNewWidget(self, event): pass
29,407
def OnNewPackage(self, event): self.editor.addNewPackage() pass
def OnNewPackage(self, event): self.editor.addNewPackage() pass
29,408
def get_current_frame(): try: 1 + '' # raise an exception except: return sys.exc_info()[2].tb_frame
def get_current_frame(): try: 1 + '' # raise an exception except: return sys.exc_info()[2].tb_frame
29,409
def get_current_frame(): try: 1 + '' # raise an exception except: return sys.exc_info()[2].tb_frame
def get_current_frame(): try: 1 + '' # raise an exception except: return sys.exc_info()[2].tb_frame
29,410
def OnInit(self): wxInitAllImageHandlers()
def OnInit(self): wxInitAllImageHandlers()
29,411
def __init__(self, parent, id, inspector, newMenu, componentPalette, app, palette): self._created = False self._init_ctrls(parent)
def __init__(self, parent, id, inspector, newMenu, componentPalette, app, palette): self._created = False self._init_ctrls(parent)
29,412
def applyChangeBlock(self, conflict, blockIdx): rev, start, size = conflict lines = self.getDataAsLines()
def applyChangeBlock(self, conflict, blockIdx): rev, start, size = conflict lines = self.getDataAsLines()
29,413
def debug(self, params = None): if self.savedAs: if self.editor.debugger: self.editor.debugger.Show(true) else: self.editor.debugger = Debugger.DebuggerFrame(self) self.editor.debugger.Show(true) if params is None: params = [] self.editor.debugger.debug_file(self.editor.debugger.filename, params)
def debug(self, params=None, cont_if_running=0, cont_always=0, temp_breakpoint=None): if self.savedAs: if self.editor.debugger: self.editor.debugger.Show(true) else: self.editor.debugger = Debugger.DebuggerFrame(self) self.editor.debugger.Show(true) if params is None: params = [] self.editor.debugger.debug_file(self.ed...
29,414
def debug(self, params = None): if self.savedAs: if self.editor.debugger: self.editor.debugger.Show(true) else: self.editor.debugger = Debugger.DebuggerFrame(self) self.editor.debugger.Show(true) if params is None: params = [] self.editor.debugger.debug_file(self.editor.debugger.filename, params)
def debug(self, params = None): if self.savedAs: if self.editor.debugger: self.editor.debugger.Show(true) else: self.editor.debugger = Debugger.DebuggerFrame(self) self.editor.debugger.Show(true) if params is None: params = [] self.editor.debugger.debug_file(self.editor.debugger.filename, params)
29,415
def readCustomClasses(self, mod, cls): """ Read definition for Custom Classes Custom Classes can be defined as a class attribute named _custom_classes containing a dictionary defining wxPython classes and their custom equivalents, e.g. _custom_classes = {'wxTreeCtrl': ['MyTreeCtrl', 'AdvancedTreeCtrl']} These custom ...
def readCustomClasses(self, mod, cls): """ Read definition for Custom Classes Custom Classes can be defined as a class attribute named _custom_classes containing a dictionary defining wxPython classes and their custom equivalents, e.g. _custom_classes = {'wxTreeCtrl': ['MyTreeCtrl', 'AdvancedTreeCtrl']} These custom ...
29,416
def readCustomClasses(self, mod, cls): """ Read definition for Custom Classes Custom Classes can be defined as a class attribute named _custom_classes containing a dictionary defining wxPython classes and their custom equivalents, e.g. _custom_classes = {'wxTreeCtrl': ['MyTreeCtrl', 'AdvancedTreeCtrl']} These custom ...
def readCustomClasses(self, mod, cls): """ Read definition for Custom Classes Custom Classes can be defined as a class attribute named _custom_classes containing a dictionary defining wxPython classes and their custom equivalents, e.g. _custom_classes = {'wxTreeCtrl': ['MyTreeCtrl', 'AdvancedTreeCtrl']} These custom ...
29,417
def idModel(self, name): absPath = self.normaliseModuleRelativeToApp(self.modules[name][2]) if os.path.exists(absPath): self.moduleModels[name], main = identifyFile(absPath) else: if self.editor.modules.has_key(absPath): self.moduleModels[name], main = identifySource( self.editor.modules[absPath].model.getModule().sour...
def idModel(self, name): absPath = self.normaliseModuleRelativeToApp(self.modules[name][2]) if os.path.exists(absPath): self.moduleModels[name], main = identifyFile(absPath) else: if self.editor.modules.has_key(absPath): self.moduleModels[name], main = identifySource( self.editor.modules[absPath].model.getModule().sour...
29,418
def __init__(self, parent, model): id = NewId() wxTreeCtrl.__init__(self, parent, id)#, style = wxTR_HAS_BUTTONS | wxSUNKEN_BORDER) EditorView.__init__(self, model, (('Goto line', self.OnGoto, self.gotoLineBmp, ''),), 0)
def __init__(self, parent, model): id = wxNewId() wxTreeCtrl.__init__(self, parent, id)#, style = wxTR_HAS_BUTTONS | wxSUNKEN_BORDER) EditorView.__init__(self, model, (('Goto line', self.OnGoto, self.gotoLineBmp, ''),), 0)
29,419
def _init_coll_notebook1_Pages(self, parent): # generated method, don't edit
def _init_coll_notebook1_Pages(self, parent): # generated method, don't edit
29,420
def OnDebuggerStopped(self, event): """Called when a debugger process stops.""" show_dialog = 0 if self.running: show_dialog = 1 self.killDebugger() if show_dialog: wxMessageDialog( self, 'The debugger process stopped prematurely.', 'Debugger stopped', wxOK | wxICON_EXCLAMATION | wxCENTRE).ShowModal()
def OnDebuggerStopped(self, event): """Called when a debugger process stops.""" show_dialog = 0 if self.running: show_dialog = 1 if not self._destroyed: self.killDebugger() if show_dialog: wxMessageDialog( self, 'The debugger process stopped prematurely.', 'Debugger stopped', wxOK | wxICON_EXCLAMATION | wxCENTRE).ShowM...
29,421
def OnDebuggerStopped(self, event): """Called when a debugger process stops.""" show_dialog = 0 if self.running: show_dialog = 1 self.killDebugger() if show_dialog: wxMessageDialog( self, 'The debugger process stopped prematurely.', 'Debugger stopped', wxOK | wxICON_EXCLAMATION | wxCENTRE).ShowModal()
def OnDebuggerStopped(self, event): """Called when a debugger process stops.""" show_dialog = 0 if self.running: show_dialog = 1 self.killDebugger() if show_dialog: wxMessageDialog( self, 'The debugger process stopped prematurely.', 'Debugger stopped', wxOK | wxICON_EXCLAMATION | wxCENTRE).ShowModal()
29,422
def OnStreamTimer(self, event=None, force_timer=0): if self.stream_timer: self.updateOutputWindow() # A non polling stream can block a process ## The user is looking at the output page. ## if (force_timer or self.nbTop.GetSelection() == 2) \ if not self.stream_timer.IsRunning(): self.stream_timer.Start(100, 1) # One-s...
def OnStreamTimer(self, event=None, force_timer=0): if self.stream_timer: self.updateOutputWindow() # A non polling stream can block a process ## The user is looking at the output page. ## if (force_timer or self.nbTop.GetSelection() == 2) \ if not self.stream_timer.IsRunning(): self.stream_timer.Start(100, 1) # One-s...
29,423
def OnCloseWindow(self, event): try: self.killDebugger() finally: self.debug_client = None self.destroy() self._destroyed = 1 try: self.editor.debugger = None except: pass self.editor = None #event.Skip() self.Destroy()
def OnCloseWindow(self, event): try: self.killDebugger() finally: self.debug_client = None self.destroy() try: self.editor.debugger = None except: pass self.editor = None #event.Skip() self.Destroy()
29,424
def OnCloseWindow(self, event): try: self.killDebugger() finally: self.debug_client = None self.destroy() self._destroyed = 1 try: self.editor.debugger = None except: pass self.editor = None #event.Skip() self.Destroy()
def OnCloseWindow(self, event): try: self.killDebugger() finally: self.debug_client = None self.destroy() self._destroyed = 1 try: self.editor.debugger = None except: pass self.editor = None #event.Skip() self.Destroy()
29,425
def proceedAndRequestStatus(self, command, temp_breakpoint=0, args=()): """Executes one non-blocking command then returns getStatusSummary(). Blocking.""" if temp_breakpoint: self.addBreakpoint(temp_breakpoint[0], temp_breakpoint[1], 1) if command: allowed = ('set_continue', 'set_step', 'set_step_over', 'set_step_out'...
def proceedAndRequestStatus(self, command, temp_breakpoint=0, args=()): """Executes one non-blocking command then returns getStatusSummary(). Blocking.""" if temp_breakpoint: self.addBreakpoint(temp_breakpoint[0], temp_breakpoint[1], 1) if command: allowed = ('set_continue', 'set_step', 'set_step_over', 'set_step_out'...
29,426
def run(self, cmd, globals=None, locals=None): try: self._running = 1 try: Bdb.run(self, cmd, globals, locals) except (BdbQuit, SystemExit): pass except Exception, e: # Provide post-mortem analysis. import traceback traceback.print_exc() self.exc_info = sys.exc_info() self.frame = self.exc_info[2].tb_frame self.quittin...
def run(self, cmd, globals=None, locals=None): try: self._running = 1 try: Bdb.run(self, cmd, globals, locals) except (BdbQuit, SystemExit): pass except: # Provide post-mortem analysis. import traceback traceback.print_exc() self.exc_info = sys.exc_info() self.frame = self.exc_info[2].tb_frame self.quitting = 0 self.ev...
29,427
def add(self, respath): if respath in self.entries: self.entries.remove(respath)
def add(self, respath): if respath in self.entries: self.entries.remove(respath)
29,428
def writeGlobalDict(self, name, dct): start, end = self.findGlobalDict(name) eol = Utils.getEOLMode(self.data) self.data = self.data[:start]+pprint.pformat(dct).replace('\r', eol)+\ self.data[end:]
def writeGlobalDict(self, name, dct): start, end = self.findGlobalDict(name) eol = Utils.getEOLMode(self.data) self.data = self.data[:start]+pprint.pformat(dct).replace('\n', eol)+\ self.data[end:]
29,429
def OnKeyDown(self, event): if Preferences.handleSpecialEuropeanKeys: self.handleSpecialEuropeanKeys(event, Preferences.euroKeysCountry)
def OnKeyDown(self, event): if Preferences.handleSpecialEuropeanKeys: self.handleSpecialEuropeanKeys(event, Preferences.euroKeysCountry)
29,430
def readline(self): self._reading = True self._output.AddText('\n'+Preferences.ps4) self._output.EnsureCaretVisible() try: while not self._buffer: # XXX with safe yield once the STC loses focus there is no way # XXX to give it back the focus # wxSafeYield() time.sleep(0.001) wx.Yield() line = self._buffer.pop() if line...
def readline(self): self._reading = True self._output.AddText('\n'+Preferences.ps4) self._output.EnsureCaretVisible() try: while not self._buffer: # XXX with safe yield once the STC loses focus there is no way # XXX to give it back the focus # wxSafeYield() time.sleep(0.001) wx.Yield() line = self._buffer.pop() if line...
29,431
def buildImportRelationshipDict(self, modules): relationships = {}
def buildImportRelationshipDict(self, modules): relationships = {}
29,432
def addTools(self, toolbar, model): SourceController.addTools(self, toolbar, model) toolbar.AddSeparator() addTool(self.editor, toolbar, self.profileBmp, 'Profile', self.OnProfile) addTool(self.editor, toolbar, self.compileBmp, 'Check source', self.OnCheckSource) if hasattr(model, 'app') and model.app: addTool(self.edi...
def addTools(self, toolbar, model): SourceController.addTools(self, toolbar, model) toolbar.AddSeparator() addTool(self.editor, toolbar, self.profileBmp, 'Profile', self.OnProfile) addTool(self.editor, toolbar, self.compileBmp, 'Check source', self.OnCheckSource) if hasattr(model, 'app') and model.app: addTool(self.edi...
29,433
def OnSaveAll(self, event): for modulePage in self.model.editor.modules.values(): mod = modulePage.model if mod != self.model: if hasattr(mod, 'app') and mod.app == self.model and \ (mod.modified or len(mod.viewsModified)): print 'saving', mod.filename if len(mod.viewsModified): mod.refreshFromViews() modulePage.saveOr...
defOnSaveAll(self,event):formodulePageinself.model.editor.modules.values():mod=modulePage.modelifmod!=self.model:ifhasattr(mod,'app')andmod.app==self.modeland\(mod.modifiedorlen(mod.viewsModified)):print'saving',mod.filenameiflen(mod.viewsModified):mod.refreshFromViews()modulePage.saveOrSaveAs()else:appModPage=modulePa...
29,434
def OnLinkClicked(self, linkinfo): url = linkinfo.GetHref()
def OnLinkClicked(self, linkinfo): url = linkinfo.GetHref()
29,435
def genModuleSect(self, page): classList, classNames = self.genClassListSect() module = self.model.getModule() modBody = wxwAppModuleTemplate % { \ 'ModuleSynopsis': module.getModuleDoc(), 'Module': self.model.moduleName, 'ModuleList': self.genModuleListSect()[0], 'ClassList': classList, }
def genModuleSect(self, page): classList, classNames = self.genClassListSect() module = self.model.getModule() modBody = wxwAppModuleTemplate % { \ 'ModuleSynopsis': module.getModuleDoc(), 'Module': self.model.moduleName, 'ModuleList': self.genModuleListSect()[0], 'ClassList': classList, }
29,436
def uriSplitZopeDebug(filename, filepath): # zopedebug://[host[:port]]/[path]/[meta type] # magically maps zopedebug urls to Boa zope uris segs = string.split(filepath, '/') if len(segs) < 3: raise ExplorerNodes.TransportCategoryError( 'Zope debug path invalid', filepath) host, filepath, meta = segs[0], segs[1:-1], seg...
def uriSplitZopeDebug(filename, filepath): # zopedebug://[host[:port]]/[path]/[meta type] # magically maps zopedebug urls to Boa zope uris segs = string.split(filepath, '/') if len(segs) < 3: raise ExplorerNodes.TransportCategoryError( 'Zope debug path invalid', filepath) host, filepaths, meta = segs[0], segs[1:-1], se...
29,437
def uriSplitZopeDebug(filename, filepath): # zopedebug://[host[:port]]/[path]/[meta type] # magically maps zopedebug urls to Boa zope uris segs = string.split(filepath, '/') if len(segs) < 3: raise ExplorerNodes.TransportCategoryError( 'Zope debug path invalid', filepath) host, filepath, meta = segs[0], segs[1:-1], seg...
def uriSplitZopeDebug(filename, filepath): # zopedebug://[host[:port]]/[path]/[meta type] # magically maps zopedebug urls to Boa zope uris segs = string.split(filepath, '/') if len(segs) < 3: raise ExplorerNodes.TransportCategoryError( 'Zope debug path invalid', filepath) host, filepath, meta = segs[0], segs[1:-1], seg...
29,438
def uriSplitZopeDebug(filename, filepath): # zopedebug://[host[:port]]/[path]/[meta type] # magically maps zopedebug urls to Boa zope uris segs = string.split(filepath, '/') if len(segs) < 3: raise ExplorerNodes.TransportCategoryError( 'Zope debug path invalid', filepath) host, filepath, meta = segs[0], segs[1:-1], seg...
def uriSplitZopeDebug(filename, filepath): # zopedebug://[host[:port]]/[path]/[meta type] # magically maps zopedebug urls to Boa zope uris segs = string.split(filepath, '/') if len(segs) < 3: raise ExplorerNodes.TransportCategoryError( 'Zope debug path invalid', filepath) host, filepath, meta = segs[0], segs[1:-1], seg...
29,439
def write(s): pass
def write(self, s): pass
29,440
def OnPrintSetup(self, event): printerDlg = wxPrintDialog(self) pdd = printerDlg.GetPrintDialogData() pdd.SetPrintData(self.printData) pdd.SetSetupDialog(true) printerDlg.ShowModal() self.printData = pdd.GetPrintData() printerDlg.Destroy()
def OnPrintSetup(self, event): printerDlg = wxPrintDialog(self) pdd = printerDlg.GetPrintDialogData() pdd.SetPrintData(self.printData) pdd.SetSetupDialog(true) printerDlg.ShowModal() self.printData = wxPrintData(pdd.GetPrintData()) printerDlg.Destroy()
29,441
def OnDoPrint(self, event): pdd = wxPrintDialogData() pdd.SetPrintData(self.printData) printer = wxPrinter(pdd) printout = self.createSTCPrintout() if not printer.Print(self.parentFrame, printout): wxLogError('An error occured while printing.') else: self.printData = printer.GetPrintDialogData().GetPrintData() printou...
def OnDoPrint(self, event): pdd = wxPrintDialogData() pdd.SetPrintData(self.printData) printer = wxPrinter(pdd) printout = self.createSTCPrintout() if not printer.Print(self.parentFrame, printout): wxLogError('An error occured while printing.') else: self.printData = wxPrintData(printer.GetPrintDialogData().GetPrintDa...
29,442
def __init__(self, parent, flist, debugger): wxListCtrl.__init__(self, parent, wxID_STACKVIEW, style = wxLC_REPORT | wxLC_SINGLE_SEL ) self.InsertColumn(0, 'Frame', wxLIST_FORMAT_LEFT, 150) self.InsertColumn(1, 'Line', wxLIST_FORMAT_LEFT, 35) self.InsertColumn(2, 'Code', wxLIST_FORMAT_LEFT, 300) EVT_LIST_ITEM_SELECTED(...
def __init__(self, parent, flist, debugger): wxListCtrl.__init__(self, parent, wxID_STACKVIEW, style = wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES|wxCLIP_CHILDREN) self.InsertColumn(0, 'Frame', wxLIST_FORMAT_LEFT, 150) self.InsertColumn(1, 'Line', wxLIST_FORMAT_LEFT, 35) self.InsertColumn(2, 'Code', wxLIST_FORMAT_LEFT, 300...
29,443
def __init__(self, parent, debugger):#, flist, browser): wxListCtrl.__init__(self, parent, wxID_BREAKVIEW, style = wxLC_REPORT | wxLC_SINGLE_SEL ) self.InsertColumn(0, 'Module', wxLIST_FORMAT_LEFT, 90) self.InsertColumn(1, 'Line', wxLIST_FORMAT_CENTER, 40) self.InsertColumn(2, 'Ignore', wxLIST_FORMAT_CENTER, 45) self.I...
def __init__(self, parent, debugger):#, flist, browser): wxListCtrl.__init__(self, parent, wxID_BREAKVIEW, style = wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES|wxCLIP_CHILDREN) self.InsertColumn(0, 'Module', wxLIST_FORMAT_LEFT, 90) self.InsertColumn(1, 'Line', wxLIST_FORMAT_CENTER, 40) self.InsertColumn(2, 'Ignore', wxLIST_...
29,444
def __init__(self, parent, debugger):#, flist, browser): wxListCtrl.__init__(self, parent, wxID_BREAKVIEW, style = wxLC_REPORT | wxLC_SINGLE_SEL ) self.InsertColumn(0, 'Module', wxLIST_FORMAT_LEFT, 90) self.InsertColumn(1, 'Line', wxLIST_FORMAT_CENTER, 40) self.InsertColumn(2, 'Ignore', wxLIST_FORMAT_CENTER, 45) self.I...
def __init__(self, parent, debugger):#, flist, browser): wxListCtrl.__init__(self, parent, wxID_BREAKVIEW, style = wxLC_REPORT | wxLC_SINGLE_SEL ) self.InsertColumn(0, 'Module', wxLIST_FORMAT_LEFT, 90) self.InsertColumn(1, 'Line', wxLIST_FORMAT_CENTER, 40) self.InsertColumn(2, 'Ignore', wxLIST_FORMAT_CENTER, 45) self.I...
29,445
def __init__(self, parent, add_watch, is_local, name): # , dict=None): wxListCtrl.__init__(self, parent, wxID_NSVIEW, style = wxLC_REPORT | wxLC_SINGLE_SEL ) self.InsertColumn(0, 'Attribute', wxLIST_FORMAT_LEFT, 125) self.InsertColumn(1, 'Value', wxLIST_FORMAT_LEFT, 200)
def __init__(self, parent, add_watch, is_local, name): # , dict=None): wxListCtrl.__init__(self, parent, wxID_NSVIEW, style=wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES|wxCLIP_CHILDREN) self.InsertColumn(0, 'Attribute', wxLIST_FORMAT_LEFT, 125) self.InsertColumn(1, 'Value', wxLIST_FORMAT_LEFT, 200)
29,446
def OnAddAsWatch(self, event): if self.rightsel != -1: name = self.names[self.rightsel] self.add_watch(name, self.is_local)
def OnAddAsWatch(self, event): if self.selected != -1: name = self.names[self.selected] self.add_watch(name, self.is_local)
29,447
def OnRightClick(self, event): if not self.pos: return sel = self.HitTest(self.pos)[0] if sel != -1: self.rightsel = sel self.PopupMenu(self.menu, self.pos)
def OnRightClick(self, event): if not self.pos: return if self.selected != -1: self.PopupMenu(self.menu, self.pos)
29,448
def __init__(self, parent, images, debugger): wxListCtrl.__init__(self, parent, wxID_WATCHVIEW, style = wxLC_REPORT | wxLC_SINGLE_SEL ) self.InsertColumn(0, 'Attribute', wxLIST_FORMAT_LEFT, 125) self.InsertColumn(1, 'Value', wxLIST_FORMAT_LEFT, 200)
def __init__(self, parent, images, debugger): wxListCtrl.__init__(self, parent, wxID_WATCHVIEW, style=wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES|wxCLIP_CHILDREN) self.InsertColumn(0, 'Attribute', wxLIST_FORMAT_LEFT, 125) self.InsertColumn(1, 'Value', wxLIST_FORMAT_LEFT, 200)
29,449
def __init__(self, parent, images, debugger): wxListCtrl.__init__(self, parent, wxID_WATCHVIEW, style = wxLC_REPORT | wxLC_SINGLE_SEL ) self.InsertColumn(0, 'Attribute', wxLIST_FORMAT_LEFT, 125) self.InsertColumn(1, 'Value', wxLIST_FORMAT_LEFT, 200)
defEVT_COMMAND_RIGHT_CLICK(self, -1, self.OnRightClick) __init__(self,EVT_COMMAND_RIGHT_CLICK(self, -1, self.OnRightClick) parent,EVT_COMMAND_RIGHT_CLICK(self, -1, self.OnRightClick) images,EVT_COMMAND_RIGHT_CLICK(self, -1, self.OnRightClick) debugger):EVT_COMMAND_RIGHT_CLICK(self, -1, self.OnRightClick) wxListCtrl.__i...
29,450
def OnRightClick(self, event): if not self.pos: return
def OnRightClick(self, event): if not self.pos: return
29,451
def __init__(self, parent): wxStatusBar.__init__(self, parent, -1, style=0) self.SetFieldsCount(2) self.SetMinHeight(30) #self.SetStatusWidths([-1, -1, 16])
def __init__(self, parent): wxStatusBar.__init__(self, parent, -1, style=0) self.SetFieldsCount(2) self.SetMinHeight(30) #self.SetStatusWidths([-1, -1, 16])
29,452
def __init__(self, parent): wxStatusBar.__init__(self, parent, -1, style=0) self.SetFieldsCount(2) self.SetMinHeight(30) #self.SetStatusWidths([-1, -1, 16])
def __init__(self, parent): wxStatusBar.__init__(self, parent, -1, style=0) self.SetFieldsCount(2) self.SetMinHeight(30) #self.SetStatusWidths([-1, -1, 16])
29,453
def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger')
def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger')
29,454
def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger')
def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger')
29,455
def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger')
def__init__(self,editor,filename=None,slave_mode=1):wxFrame.__init__(self,editor,-1,'Debugger')
29,456
def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger')
def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger')
29,457
def clientFNToServerFN(self, filename): """Converts a filename on the client to a filename on the server.
def clientFNToServerFN(self, filename): """Converts a filename on the client to a filename on the server.
29,458
def serverFNToClientFN(self, filename): """Converts a filename on the server to a filename on the client.
def serverFNToClientFN(self, filename): """Converts a filename on the server to a filename on the client.
29,459
def receiveDebuggerStatus(self, info): # Get stdout and stderr if available. errout = self.editor.erroutFrm data = info.get('stdout', None) if data: errout.appendToOutput(data) #self.appendToOutputWindow(data) data = info.get('stderr', None) if data: errout.appendToErrors(data) #self.appendToOutputWindow(data)
def receiveDebuggerStatus(self, info): # Get stdout and stderr if available. errout = self.editor.erroutFrm data = info.get('stdout', None) if data: errout.appendToOutput(data) #self.appendToOutputWindow(data) data = info.get('stderr', None) if data: errout.appendToErrors(data) #self.appendToOutputWindow(data)
29,460
def restoreDebugger(self): if self.editor.palette.IsShown(): if self.editor.palette.IsIconized(): self.editor.palette.restore() self.editor.restore() elif self.editor.IsIconized(): self.editor.restore()
def restoreDebugger(self): if self.editor: if self.editor.palette.IsShown(): if self.editor.palette.IsIconized(): self.editor.palette.restore() self.editor.restore() elif self.editor.IsIconized(): self.editor.restore() elif self.editor.IsIconized(): self.editor.restore()
29,461
def restoreDebugger(self): if self.editor.palette.IsShown(): if self.editor.palette.IsIconized(): self.editor.palette.restore() self.editor.restore() elif self.editor.IsIconized(): self.editor.restore()
def restoreDebugger(self): if self.editor.palette.IsShown(): if self.editor.palette.IsIconized(): self.editor.palette.restore() self.editor.restore() elif self.editor.IsIconized(): self.editor.restore()
29,462
def _init_ctrls(self, prnt): wxDialog.__init__(self, id = wxID_FINDREPLACEDLG, name = 'FindReplaceDlg', parent = prnt, pos = wxPoint(394, 361), size = wxSize(372, 234), style = wxDEFAULT_DIALOG_STYLE, title = 'Find/Replace Dialog') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 207))
def _init_ctrls(self, prnt): wxDialog.__init__(self, id = wxID_FINDREPLACEDLG, name = 'FindReplaceDlg', parent = prnt, pos = wxPoint(394, 361), size = wxSize(372, 234), style = wxDEFAULT_DIALOG_STYLE, title = 'Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 207))
29,463
def addMenus(self, menu, model): accls = ModuleController.addMenus(self, menu, model) menu.AppendSeparator() self.addMenu(menu, EditorHelper.wxID_SETUPBUILD, 'build', accls, ()) self.addMenu(menu, EditorHelper.wxID_SETUPCLEAN, 'clean', accls, ()) self.addMenu(menu, EditorHelper.wxID_SETUPINSTALL, 'install', accls, ()) ...
def addMenus(self, menu, model): accls = ModuleController.addMenus(self, menu, model) menu.AppendSeparator() self.addMenu(menu, EditorHelper.wxID_SETUPBUILD, 'setup.py build', accls, ()) self.addMenu(menu, EditorHelper.wxID_SETUPCLEAN, 'setup.py clean', accls, ()) self.addMenu(menu, EditorHelper.wxID_SETUPINSTALL, 'set...
29,464
def addMenus(self, menu, model): accls = ModuleController.addMenus(self, menu, model) menu.AppendSeparator() self.addMenu(menu, EditorHelper.wxID_SETUPBUILD, 'build', accls, ()) self.addMenu(menu, EditorHelper.wxID_SETUPCLEAN, 'clean', accls, ()) self.addMenu(menu, EditorHelper.wxID_SETUPINSTALL, 'install', accls, ()) ...
def addMenus(self, menu, model): accls = ModuleController.addMenus(self, menu, model) menu.AppendSeparator() self.addMenu(menu, EditorHelper.wxID_SETUPBUILD, 'build', accls, ()) self.addMenu(menu, EditorHelper.wxID_SETUPCLEAN, 'clean', accls, ()) self.addMenu(menu, EditorHelper.wxID_SETUPINSTALL, 'install', accls, ()) ...
29,465
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): newNameBase = os.path.join(self.resourcepath, 'copy%s_of_'+node.name) num = '' while 1: newName = newNameBase%num if os.path.exists(n...
defcopyFileFrom(self,node):"""Copynodeintoself(onlycalledforfolders)"""importshutilifnotnode.isDir():ifnode.resourcepath==os.path.join(self.resourcepath,node.name):newNameBase=os.path.join(self.resourcepath,'copy%s_of_'+node.name)num=''while1:newName=newNameBase%numifos.path.exists(newName):try:num=str(int(num)+1)excep...
29,466
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): newNameBase = os.path.join(self.resourcepath, 'copy%s_of_'+node.name) num = '' while 1: newName = newNameBase%num if os.path.exists(n...
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): newNameBase = os.path.join(self.resourcepath, 'copy%s_of_'+node.name) num = '' while 1: newName = newNameBase%num if os.path.exists(n...
29,467
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): newNameBase = os.path.join(self.resourcepath, 'copy%s_of_'+node.name) num = '' while 1: newName = newNameBase%num if os.path.exists(n...
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): newNameBase = os.path.join(self.resourcepath, 'copy%s_of_'+node.name) num = '' while 1: newName = newNameBase%num if os.path.exists(n...
29,468
def load(self): return open(self.resourcepath, 'rb').read()
def load(self): return open(self.resourcepath, 'rb').read()
29,469
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, 'wb') except IOError, message: dlg = wx.wxMessageDialog(self.editor, 'Could not save\n'+message.strerror, 'Error'...
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, mode) except IOError, message: dlg = wx.wxMessageDialog(self.editor, 'Could not save\n'+message.strerror, 'Error'...
29,470
def __init__(self): Bdb.__init__(self) self.fncache = {}
def __init__(self): Bdb.__init__(self) self.fncache = {}
29,471
def canonic(self, filename): canonic = self.fncache.get(filename, None) if not canonic: if filename[:1] == '<' and filename[-1:] == '>': canonic = filename else: # Should we deal with URL's here? (we are...) if filename[:12] == 'zopedebug://': canonic = filename else: canonic = path.abspath(filename) self.fncache[file...
def canonic(self, filename): canonic = self.fncache.get(filename, None) if not canonic: if ((filename[:1] == '<' and filename[-1:] == '>') or filename.find('://') >= 0): canonic = filename else: # Should we deal with URL's here? (we are...) if filename[:12] == 'zopedebug://': canonic = filename else: canonic = path.ab...
29,472
def canonic(self, filename): canonic = self.fncache.get(filename, None) if not canonic: if filename[:1] == '<' and filename[-1:] == '>': canonic = filename else: # Should we deal with URL's here? (we are...) if filename[:12] == 'zopedebug://': canonic = filename else: canonic = path.abspath(filename) self.fncache[file...
def canonic(self, filename): canonic = self.fncache.get(filename, None) if not canonic: if filename[:1] == '<' and filename[-1:] == '>': canonic = filename else: # Should we deal with URL's here? (we are...)canonic = path.abspath(filename) self.fncache[filename] = canonic return canonic
29,473
def break_here(self, frame): # Redefine breaking :( filename = frame.f_code.co_filename if filename == 'Script (Python)': # XXX filename, lineno = self.adjustedFrameInfo(frame)[-2:] else: filename = self.canonic(filename) lineno = frame.f_lineno if not self.breaks.has_key(filename): return 0 if not lineno in self.bre...
def break_here(self, frame): # Redefine breaking :( filename = frame.f_code.co_filename if filename == 'Script (Python)': # XXX filename, lineno = self.adjustedFrameInfo(frame)[-2:] else: filename = self.canonic(filename) lineno = frame.f_lineno if not self.breaks.has_key(filename): return 0 if not lineno in self.bre...
29,474
def break_here(self, frame): # Redefine breaking :( filename = frame.f_code.co_filename if filename == 'Script (Python)': # XXX filename, lineno = self.adjustedFrameInfo(frame)[-2:] else: filename = self.canonic(filename) lineno = frame.f_lineno if not self.breaks.has_key(filename): return 0 if not lineno in self.bre...
def break_here(self, frame): # Redefine breaking :( filename = frame.f_code.co_filename if filename == 'Script (Python)': # XXX filename, lineno = self.adjustedFrameInfo(frame)[-2:] else: filename = self.canonic(filename) lineno = frame.f_lineno if not self.breaks.has_key(filename): return 0 if not lineno in self.bre...
29,475
def break_anywhere(self, frame): # Redefine breaking :( filename = frame.f_code.co_filename if filename == 'Script (Python)': # XXX filename = self.adjustedFrameInfo(frame)[2] else: filename = self.canonic(filename) return self.breaks.has_key(filename)
def break_anywhere(self, frame): # Redefine breaking :( filename = frame.f_code.co_filename if filename == 'Script (Python)': # XXX filename = self.adjustedFrameInfo(frame)[2] else: filename = self.canonic(filename) return self.breaks.has_key(filename)
29,476
## def break_anywhere(self, frame):
## def break_anywhere(self, frame):
29,477
def hard_break_here(self, frame): """Indicates whether the debugger should stop at a hard breakpoint.
def hard_break_here(self, frame): """Indicates whether the debugger should stop at a hard breakpoint.
29,478
def hard_break_here(self, frame): """Indicates whether the debugger should stop at a hard breakpoint.
defhard_break_here(self,frame):"""Indicateswhetherthedebuggershouldstopatahardbreakpoint.
29,479
def set_internal_breakpoint(self, filename, lineno, temporary=0, cond=None): if not self.breaks.has_key(filename): self.breaks[filename] = [] list = self.breaks[filename] if not lineno in list: list.append(lineno)
def set_internal_breakpoint(self, filename, lineno, temporary=0, cond=None): if not self.breaks.has_key(filename): self.breaks[filename] = [] list = self.breaks[filename] if not lineno in list: list.append(lineno)
29,480
def set_break(self, filename, lineno, temporary=0, cond=None): #orig_filename = filename filename = self.canonic(filename) # XXX zopedebug uris are now stored in bdb ##import linecache # Import as late as possible ##line = linecache.getline(filename, lineno) ##if not line: ## # XXX maybe should call linecache.checkc...
defset_break(self,filename,lineno,temporary=0,cond=None):#orig_filename=filenamefilename=self.canonic(filename)#XXXzopedebugurisarenowstoredinbdb##importlinecache#Importaslateaspossible##line=linecache.getline(filename,lineno)##ifnotline:###XXXmaybeshouldcalllinecache.checkcache()here?##return'Invalidline:%s(%s)'%(file...
29,481
def set_break(self, filename, lineno, temporary=0, cond=None): #orig_filename = filename filename = self.canonic(filename) # XXX zopedebug uris are now stored in bdb ##import linecache # Import as late as possible ##line = linecache.getline(filename, lineno) ##if not line: ## # XXX maybe should call linecache.checkc...
def set_break(self, filename, lineno, temporary=0, cond=None): #orig_filename = filename filename = self.canonic(filename) # XXX zopedebug uris are now stored in bdb ##import linecache # Import as late as possible ##line = linecache.getline(filename, lineno) ##if not line: ## # XXX maybe should call linecache.checkc...
29,482
def set_break(self, filename, lineno, temporary=0, cond=None): #orig_filename = filename filename = self.canonic(filename) # XXX zopedebug uris are now stored in bdb ##import linecache # Import as late as possible ##line = linecache.getline(filename, lineno) ##if not line: ## # XXX maybe should call linecache.checkc...
def set_break(self, filename, lineno, temporary=0, cond=None): #orig_filename = filename filename = self.canonic(filename) # XXX zopedebug uris are now stored in bdb ##import linecache # Import as late as possible ##line = linecache.getline(filename, lineno) ##if not line: ## # XXX maybe should call linecache.checkc...
29,483
def user_line(self, frame): # This method is called when we stop or break at a line if not self._lock.acquire(0): # Already working in another thread. return if self.autocont: self.autocont = 0 self.set_continue() return self.stopframe = () # Don't stop. self.ignore_stopline = -1 self.frame = frame self.exc_info = Non...
def user_line(self, frame): # This method is called when we stop or break at a line if not self._lock.acquire(0): # Already working in another thread. return if self.autocont: self.autocont = 0 self.set_continue() return self.stopframe = () # Don't stop. self.ignore_stopline = -1 self.frame = frame self.exc_info = Non...
29,484
def adjustBreakpoints(self, filename, lineno, delta): """Moves all applicable breakpoints when delta lines are added or deleted. Non-blocking. """ ## This can be more efficient, but for now sticking to the bdb interface # Unfortunately this must be done on a low level filename = self.canonic(filename) breaklines = self...
def adjustBreakpoints(self, filename, lineno, delta): """Moves all applicable breakpoints when delta lines are added or deleted. Non-blocking. """ ## This can be more efficient, but for now sticking to the bdb interface # Unfortunately this must be done on a low level filename = self.canonic(filename) breaklines = self...
29,485
def adjustedFrameInfo(self, frame): code = frame.f_code filename = code.co_filename funcname = code.co_name lineno = frame.f_lineno try: modname = frame.f_globals['__name__'] except: modname = '' # Special case to package Python Scripts if filename == 'Script (Python)': try: # adjust for Boa's added def <name>(): line ...
def adjustedFrameInfo(self, frame): code = frame.f_code filename = code.co_filename funcname = code.co_name lineno = frame.f_lineno try: modname = frame.f_globals['__name__'] except: modname = '' # Special case to package Python Scripts if filename == 'Script (Python)': try: # adjust for Boa's added def <name>(): line ...
29,486
def getExtendedFrameInfo(self): try: (exc_type, exc_value, stack, frame_stack_len) = self.getStackInfo() stack_summary = [] for frame, lineno in stack: modname, funcname, filename, lineno = \ self.adjustedFrameInfo(frame) stack_summary.append( {'filename':filename, 'lineno':lineno, 'funcname':funcname, 'modname':modna...
def getExtendedFrameInfo(self): try: (exc_type, exc_value, stack, frame_stack_len) = self.getStackInfo() stack_summary = [] for frame, lineno in stack: filename, lineno = self.getFilenameAndLine(frame) modname, funcname = self.getFrameNames(frame) stack_summary.append( {'filename':filename, 'lineno':lineno, 'funcname':...
29,487
def findInSource(self, view, pattern): region = self.getRegion(view) self.addFind(pattern) start = view.GetSelection()[not self.reverse] if self.selection: result = self._find(view.GetTextRange(*region), pattern, start, region[0]) else: result = self._find(view.GetText(), pattern, start, 0) if result is None: raise Fin...
def findInSource(self, view, pattern): region = self.getRegion(view) self.addFind(pattern) start = view.GetSelection()[not self.reverse] if self.selection: result = self._find(view.GetTextRange(*region), pattern, start, region[0]) else: result = self._find(view.GetText(), pattern, start, 0) if result is None: raise Fin...
29,488
def getBody(self, data): tmp = data[data.find(':')+2:], '\n'.split() tmp2 = [] for l in tmp: # Handle comments which may be indented less if l[:4].strip(): l = l.lstrip() else: l = l[4:] tmp2.append(l) return '\n'.join(tmp2)
def getBody(self, data): tmp = data[data.find(':')+2:].split('\n') tmp2 = [] for l in tmp: # Handle comments which may be indented less if l[:4].strip(): l = l.lstrip() else: l = l[4:] tmp2.append(l) return '\n'.join(tmp2)
29,489
def getBody(self, data): tmp = data[data.find(':')+2:], '\n'.split() tmp2 = [] for l in tmp: # Handle comments which may be indented less if l[:4].strip(): l = l.lstrip() else: l = l[4:] tmp2.append(l) return '\n'.join(tmp2)
def getBody(self, data): tmp = data[data.find(':')+2:], '\n'.split() tmp2 = [] for l in tmp: # Handle comments which may be indented less if l[:4].strip(): l = l.lstrip() else: l = l[4:] tmp2.append(l) return '\n'.join(tmp2)
29,490
def __init__(self): Bdb.__init__(self) self.fncache = {}
def __init__(self): Bdb.__init__(self) self.fncache = {}
29,491
def break_anywhere(self, frame): # Allow a stop anywhere, anytime. # todo: Optimize by stopping only when in one of the # files being debugged? Problem: callbacks don't get debugged. return 1
def break_anywhere(self, frame): # Allow a stop anywhere, anytime. # todo: Optimize by stopping only when in one of the # files being debugged? Problem: callbacks don't get debugged. return 1
29,492
def set_continue(self, full_speed=0): # Only stop at breakpoints, exceptions or when finished self.stopframe = () self.returnframe = None self.quitting = 0
def set_continue(self, full_speed=0): # Only stop at breakpoints, exceptions or when finished self.stopframe = () self.returnframe = None self.quitting = 0
29,493
def set_continue(self, full_speed=0): # Only stop at breakpoints, exceptions or when finished self.stopframe = () self.returnframe = None self.quitting = 0
def set_continue(self, full_speed=0): # Only stop at breakpoints, exceptions or when finished self.stopframe = () self.returnframe = None self.quitting = 0
29,494
def set_continue(self, full_speed=0): # Only stop at breakpoints, exceptions or when finished self.stopframe = () self.returnframe = None self.quitting = 0
def set_continue(self, full_speed=0): # Only stop at breakpoints, exceptions or when finished self.stopframe = () self.returnframe = None self.quitting = 0
29,495
def set_continue(self, full_speed=0): # Only stop at breakpoints, exceptions or when finished self.stopframe = () self.returnframe = None self.quitting = 0
def set_continue(self, full_speed=0): # Only stop at breakpoints, exceptions or when finished self.stopframe = () self.returnframe = None self.quitting = 0
29,496
def set_trace(self, call_depth=1): """Start debugging from the caller frame.
def set_trace(self, call_depth=1): """Start debugging from the caller frame.
29,497
def set_trace(self, call_depth=1): """Start debugging from the caller frame.
def set_trace(self, call_depth=1): """Start debugging from the caller frame.
29,498
def set_trace(self, call_depth=1): """Start debugging from the caller frame.
defroot_frame = frame set_trace(self,root_frame = frame call_depth=1):root_frame = frame """Startroot_frame = frame debuggingroot_frame = frame fromroot_frame = frame theroot_frame = frame callerroot_frame = frame frame.
29,499