bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def getSimpleRunnerSrc(self): """ Return template of source code that will run this module type as a stand-alone file """ return simpleAppFrameRunSrc
def getSimpleRunnerSrc(self): """ Return template of source code that will run this module type as a stand-alone file """ return simpleAppFrameRunSrc
29,300
def getSimpleRunnerSrc(self): return simpleAppDialogRunSrc
def getSimpleRunnerSrc(self): return simpleAppDialogRunSrc
29,301
def getSimpleRunnerSrc(self): return simpleAppPopupRunSrc
def getSimpleRunnerSrc(self): return simpleAppPopupRunSrc
29,302
def getSimpleRunnerSrc(self): return simpleAppPopupRunSrc
def getSimpleRunnerSrc(self): return simpleAppPopupRunSrc
29,303
def new(self, mainModule): self.data = (defEnvPython + defSig + defImport + defApp) \ %(self.modelIdentifier, boaClass, mainModule, mainModule, mainModule, mainModule) self.saved = false self.modified = true self.update() self.notify()
def new(self, mainModule): self.data = (sourceconst.defEnvPython + sourceconst.defSig + \ sourceconst.defImport + sourceconst.defApp)%( self.modelIdentifier, sourceconst.boaClass, mainModule, mainModule, mainModule, mainModule) self.saved = false self.modified = true self.update() self.notify()
29,304
def new(self, mainModule): self.data = (defEnvPython + defSig + defImport + defApp) \ %(self.modelIdentifier, boaClass, mainModule, mainModule, mainModule, mainModule) self.saved = false self.modified = true self.update() self.notify()
defnew(self,mainModule):self.data=(defEnvPython+defSig+defImport+defApp)\%(self.modelIdentifier,boaClass,mainModule,mainModule,mainModule,mainModule)self.saved=falseself.modified=trueself.update()self.notify()
29,305
def extractKVParams(self, paramsStr): params = safesplitfields(paramsStr, ',') result = {} cnt = 0 for param in params: try: sidx = string.index(param, '=') except ValueError: result[`cnt`] = string.strip(param[sidx+1:]) else: result[string.strip(param[:sidx])] = string.strip(param[sidx+1:]) cnt = cnt + 1 return result
def extractKVParams(self, paramsStr): params = safesplitfields(paramsStr, ',') result = {} for param in params: try: sidx = string.index(param, '=') except ValueError: result[`cnt`] = string.strip(param[sidx+1:]) else: result[string.strip(param[:sidx])] = string.strip(param[sidx+1:]) cnt = cnt + 1 return result
29,306
def extractKVParams(self, paramsStr): params = safesplitfields(paramsStr, ',') result = {} cnt = 0 for param in params: try: sidx = string.index(param, '=') except ValueError: result[`cnt`] = string.strip(param[sidx+1:]) else: result[string.strip(param[:sidx])] = string.strip(param[sidx+1:]) cnt = cnt + 1 return result
def extractKVParams(self, paramsStr): params = safesplitfields(paramsStr, ',') result = {} cnt = 0 for param in params: try: sidx = string.index(param, '=') except ValueError: pass else: result[string.strip(param[:sidx])] = string.strip(param[sidx+1:]) cnt = cnt + 1 return result
29,307
def extractKVParams(self, paramsStr): params = safesplitfields(paramsStr, ',') result = {} cnt = 0 for param in params: try: sidx = string.index(param, '=') except ValueError: result[`cnt`] = string.strip(param[sidx+1:]) else: result[string.strip(param[:sidx])] = string.strip(param[sidx+1:]) cnt = cnt + 1 return result
def extractKVParams(self, paramsStr): params = safesplitfields(paramsStr, ',') result = {} cnt = 0 for param in params: try: sidx = string.index(param, '=') except ValueError: result[`cnt`] = string.strip(param[sidx+1:]) else: result[string.strip(param[:sidx])] = string.strip(param[sidx+1:]) return result
29,308
def setDebugClient(self, client=None): if client is None: from ChildProcessClient import ChildProcessClient client = ChildProcessClient(self) self.debug_client = client
def setDebugClient(self, client=None): if client is None: from ChildProcessClient import ChildProcessClient client = ChildProcessClient(self, '--zope') self.debug_client = client
29,309
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,310
def __init__(self, zopeDir): self.zopeDir = zopeDir if self.zopeDir: self.prodsDir = path.join(zopeDir, 'lib','python','Products') else: self.prodsDir = ''
def __init__(self, zopeDir): self.zopeDir = zopeDir if self.zopeDir: self.prodsDir = os.path.join(zopeDir, 'lib','python','Products') else: self.prodsDir = ''
29,311
def getModules(self): mods = self._addPyMods(path.join(self.zopeDir, 'Extensions'))
def getModules(self): mods = self._addPyMods(path.join(self.zopeDir, 'Extensions'))
29,312
def getModules(self): mods = self._addPyMods(path.join(self.zopeDir, 'Extensions'))
def getModules(self): mods = self._addPyMods(path.join(self.zopeDir, 'Extensions'))
29,313
def _addPyMods(self, pypath, prod=''): from Explorers import Explorer Explorer.listdirEx(pypath, '.zexp') mods = [] fls = Explorer.listdirEx(pypath, '.py') for file in fls: mods.append(prod +(prod and '.')+path.splitext(file)[0]) return mods
def _addPyMods(self, pypath, prod=''): from Explorers import Explorer Explorer.listdirEx(pypath, '.zexp') mods = [] fls = Explorer.listdirEx(pypath, '.py') for file in fls: mods.append(prod +(prod and '.')+os.path.splitext(file)[0]) return mods
29,314
def getExtPath(self, module): modLst = string.split(module, '.') if len(modLst) == 1: modpath = path.join(self.zopeDir, 'Extensions', modLst[0] + '.py') else: modpath = path.join(self.prodsDir, modLst[0], 'Extensions', modLst[1]+'.py') return string.replace(modpath, '<LocalFS::directory>', '<LocalFS::file>')
def getExtPath(self, module): modLst = module.split('.') if len(modLst) == 1: modpath = path.join(self.zopeDir, 'Extensions', modLst[0] + '.py') else: modpath = path.join(self.prodsDir, modLst[0], 'Extensions', modLst[1]+'.py') return string.replace(modpath, '<LocalFS::directory>', '<LocalFS::file>')
29,315
def getExtPath(self, module): modLst = string.split(module, '.') if len(modLst) == 1: modpath = path.join(self.zopeDir, 'Extensions', modLst[0] + '.py') else: modpath = path.join(self.prodsDir, modLst[0], 'Extensions', modLst[1]+'.py') return string.replace(modpath, '<LocalFS::directory>', '<LocalFS::file>')
def getExtPath(self, module): modLst = string.split(module, '.') if len(modLst) == 1: modpath = os.path.join(self.zopeDir, 'Extensions', modLst[0] + '.py') else: modpath = path.join(self.prodsDir, modLst[0], 'Extensions', modLst[1]+'.py') return string.replace(modpath, '<LocalFS::directory>', '<LocalFS::file>')
29,316
def getExtPath(self, module): modLst = string.split(module, '.') if len(modLst) == 1: modpath = path.join(self.zopeDir, 'Extensions', modLst[0] + '.py') else: modpath = path.join(self.prodsDir, modLst[0], 'Extensions', modLst[1]+'.py') return string.replace(modpath, '<LocalFS::directory>', '<LocalFS::file>')
def getExtPath(self, module): modLst = string.split(module, '.') if len(modLst) == 1: modpath = path.join(self.zopeDir, 'Extensions', modLst[0] + '.py') else: modpath = path.join(self.prodsDir, modLst[0], 'Extensions', modLst[1]+'.py') return string.replace(modpath, '<LocalFS::directory>', '<LocalFS::file>')
29,317
def getFunctions(self, module): from Explorers import Explorer extPath = self.getExtPath(module)
def getFunctions(self, module): from Explorers import Explorer extPath = self.getExtPath(module)
29,318
def extractKVParams(self, paramsStr): params = safesplitfields(paramsStr, ',') result = {} cnt = 0 for param in params: try: sidx = string.find(param, '=') except ValueError: result[`cnt`] = string.strip(param[sidx+1:]) else: result[string.strip(param[:sidx])] = string.strip(param[sidx+1:]) cnt = cnt + 1 return result
def extractKVParams(self, paramsStr): params = safesplitfields(paramsStr, ',') result = {} cnt = 0 for param in params: try: sidx = string.index(param, '=') except ValueError: result[`cnt`] = string.strip(param[sidx+1:]) else: result[string.strip(param[:sidx])] = string.strip(param[sidx+1:]) cnt = cnt + 1 return result
29,319
def run(self, filename): py_compile.compile(self.filename)
def run(self, filename): import py_compile py_compile.compile(filename)
29,320
def cvsFileLocallyModified(filename, timestamp): """ cvsFileLocallyModified -> modified, conflict """ filets = time.asctime(time.gmtime(os.stat(filename)[stat.ST_MTIME])) filesegs, cvssegs = string.split(filets), string.split(timestamp) # convert day to int to avoid zero padded differences filesegs[2], cvssegs[2] = in...
def cvsFileLocallyModified(filename, timestamp): """ cvsFileLocallyModified -> modified, conflict """ filets = time.asctime(time.gmtime(os.stat(filename)[stat.ST_MTIME])) if conflict and len(ismerge) ==1: filesegs, cvssegs = 1, 0 # convert day to int to avoid zero padded differences filesegs[2], cvssegs[2] = int(files...
29,321
def cvsFileLocallyModified(filename, timestamp): """ cvsFileLocallyModified -> modified, conflict """ filets = time.asctime(time.gmtime(os.stat(filename)[stat.ST_MTIME])) filesegs, cvssegs = string.split(filets), string.split(timestamp) # convert day to int to avoid zero padded differences filesegs[2], cvssegs[2] = in...
def cvsFileLocallyModified(filename, timestamp): """ cvsFileLocallyModified -> modified, conflict """ filets = time.asctime(time.gmtime(os.stat(filename)[stat.ST_MTIME])) filesegs, cvssegs = string.split(filets), string.split(timestamp) # convert day to int to avoid zero padded differences else: if conflict: filesegs,...
29,322
def cvsFileLocallyModified(filename, timestamp): """ cvsFileLocallyModified -> modified, conflict """ filets = time.asctime(time.gmtime(os.stat(filename)[stat.ST_MTIME])) filesegs, cvssegs = string.split(filets), string.split(timestamp) # convert day to int to avoid zero padded differences filesegs[2], cvssegs[2] = in...
def cvsFileLocallyModified(filename, timestamp): """ cvsFileLocallyModified -> modified, conflict """ filets = time.asctime(time.gmtime(os.stat(filename)[stat.ST_MTIME])) filesegs, cvssegs = string.split(filets), string.split(timestamp) # convert day to int to avoid zero padded differences filesegs[2], cvssegs[2] = in...
29,323
def cvsCmdPrompt(self, wholeCommand, inDir, help = ''): dlg = wxTextEntryDialog(self.list, 'CVSROOT: %s\nCVS_RSH: %s\n(in dir %s)\n\n%s'\ %(os.environ.get('CVSROOT', '(not defined)'), os.environ.get('CVS_RSH', '(not defined)'), inDir, help), 'CVS command line', wholeCommand) if wxPlatform == '__WXMSW__': te = Utils.get...
def cvsCmdPrompt(self, wholeCommand, inDir, help = ''): dlg = wxTextEntryDialog(self.list, 'CVSROOT: %s\nCVS_RSH: %s\n(in dir %s)\n\n%s'\ %(cvsroot, os.environ.get('CVS_RSH', '(not defined)'), inDir, help), 'CVS command line', wholeCommand) if wxPlatform == '__WXMSW__': te = Utils.getCtrlsFromDialog(dlg, 'wxTextCtrlPtr...
29,324
def crashLog(self): err = ErrorStack.crashError(os.path.splitext(self.filename)[0]+'.trace') if err: frm = self.editor.erroutFrm if frm: frm.updateCtrls(err) frm.display(err) return frm else: wx.wxLogError('Trace file not found. Run with command line param -T') return None
def crashLog(self): err = ErrorStack.crashError(os.path.splitext(self.assertLocalFile())[0]+'.trace') if err: frm = self.editor.erroutFrm if frm: frm.updateCtrls(err) frm.display(err) return frm else: wx.wxLogError('Trace file not found. Run with command line param -T') return None
29,325
def OnBbUpFirstButton(self, event): selItems = self.lbObjects.GetSelections() if selItems[0] < 1: return for item in selItems: self.moveObject(item, item - selItems[0])
def OnBbUpFirstButton(self, event): selItems = self.lbObjects.GetSelections() if not selItems or selItems[0] < 1: return for item in selItems: self.moveObject(item, item - selItems[0])
29,326
def OnBbupButton(self, event): selItems = self.lbObjects.GetSelections() if selItems[0] < 1: return for item in selItems: self.moveObject(item, item - 1)
def OnBbupButton(self, event): selItems = self.lbObjects.GetSelections() if not selItems or selItems[0] < 1: return for item in selItems: self.moveObject(item, item - 1)
29,327
def OnBbdownButton(self, event): selItems = self.lbObjects.GetSelections() cnt = len(selItems) if selItems[cnt-1] > ( len(self.ctrlNames) - 2 ): return for i in range( cnt ): item = selItems[cnt - i - 1] self.moveObject(item, item + 1)
def OnBbdownButton(self, event): selItems = self.lbObjects.GetSelections() cnt = len(selItems) if not selItems or selItems[cnt-1] > ( len(self.ctrlNames) - 2 ): return for i in range( cnt ): item = selItems[cnt - i - 1] self.moveObject(item, item + 1)
29,328
def OnBbDownLastButton(self, event): selItems = self.lbObjects.GetSelections() cnt = len(selItems) if selItems[cnt-1] > ( len(self.ctrlNames) - 2 ): return shift = len(self.ctrlNames) - 1 - selItems[cnt - 1] for i in range( cnt ): item = selItems[cnt - i - 1] self.moveObject(item, item + shift)
def OnBbDownLastButton(self, event): selItems = self.lbObjects.GetSelections() cnt = len(selItems) if not selItems or selItems[cnt-1] > ( len(self.ctrlNames) - 2 ): return shift = len(self.ctrlNames) - 1 - selItems[cnt - 1] for i in range( cnt ): item = selItems[cnt - i - 1] self.moveObject(item, item + shift)
29,329
def properties(self): props = CollectionDTC.properties(self) props.update({'Label': ('IndexRoute', wxMenu.GetLabel, wxMenu.SetLabel)}) return props
def properties(self): props = CollectionIddDTC.properties(self) props.update({'Label': ('IndexRoute', wxMenu.GetLabel, wxMenu.SetLabel)}) return props
29,330
def properties(self): props = CollectionDTC.properties(self) props.update({'Menus': ('NoneRoute', None, None)}) return props
def properties(self): props = UtilityDTC.properties(self) props.update({'Menus': ('NoneRoute', None, None)}) return props
29,331
def designTimeDefaults(self, vals): dtd = {} for param in vals.keys(): if param == 'menu': name = vals[param] if name[:4] == 'self': dtd[param] = self.designer.objects[name[5:]][1] elif name == 'wxMenu()': dtd[param] = wxMenu() else: raise 'Invalid menu reference' else: try: dtd[param] = eval(vals[param]) except Except...
def designTimeDefaults(self, vals): dtd = {} for param in vals.keys(): if param == 'menu': name = vals[param] if name[:4] == 'self': dtd[param] = self.designer.objects[name[5:]][1] elif name == 'wxMenu()': dtd[param] = wxMenu() else: raise 'Invalid menu reference' else: try: dtd[param] = eval(vals[param]) except Except...
29,332
def __init__(self, parent): self._init_ctrls(parent)
def __init__(self, parent): self._init_ctrls(parent)
29,333
def __init__(self, parent): self._init_ctrls(parent)
def __init__(self, parent): self._init_ctrls(parent)
29,334
def __init__(self, parent): self._init_ctrls(parent)
def __init__(self, parent): self._init_ctrls(parent)
29,335
def selectObject(self, compn, selectInContainment = true): """ Select an object in the inspector by populating the property pages. This method is called from the InspectableObjectCollection derived classes """
def selectObject(self, compn, selectInContainment = true): """ Select an object in the inspector by populating the property pages. This method is called from the InspectableObjectCollection derived classes """
29,336
def directPositionUpdate(self, comp): comp.persistProp(comp.name, 'SetPosition', comp.control.GetPosition())
def directPositionUpdate(self, comp): comp.persistProp(comp.name, 'SetPosition', comp.control.GetPosition())
29,337
def directSizeUpdate(self, comp): comp.persistProp(comp.name, 'SetSize', comp.control.GetSize())
def directSizeUpdate(self, comp): comp.persistProp(comp.name, 'SetSize', comp.control.GetSize())
29,338
def OnDelete(self, event): if self.selCmp and self.selCmp.designer: self.selCmp.designer.deleteCtrl(self.selCmp.name)
def OnDelete(self, event): if self.selCmp and self.selCmp.designer: self.selCmp.designer.deleteCtrl(self.selCmp.name)
29,339
def OnUp(self, event): if self.selCmp and self.selCmp.designer: self.selCmp.designer.selectParent(self.selObj)
def OnUp(self, event): if self.selCmp and self.selCmp.designer: self.selCmp.designer.selectParent(self.selObj)
29,340
def OnCut(self, event): pass
def OnCut(self, event): pass
29,341
def OnCopy(self, event): pass
def OnCopy(self, event): pass
29,342
def OnPaste(self, event): pass
def OnPaste(self, event): if self.selDesgn: self.selDesgn.OnPasteSelected(event) def OnRecreateSelection(self, event): if self.selDesgn: self.selDesgn.OnRecreateSelected(event)
29,343
def OnPost(self, event): if self.selCmp and self.selCmp.designer: self.selCmp.designer.saveOnClose = true self.selCmp.designer.Close()
def OnPost(self, event): if self.selDesgn: self.selDesgn.saveOnClose = true self.selDesgn.Close()
29,344
def OnCancel(self, event): if self.selCmp and self.selCmp.designer: self.selCmp.designer.saveOnClose = false self.selCmp.designer.Close()
def OnCancel(self, event): if self.selCmp and self.selCmp.designer: self.selCmp.designer.saveOnClose = false self.selCmp.designer.Close()
29,345
def OnHelp(self, event): if self.selCmp and self.selCmp.designer: url = self.pages.extendHelpUrl(self.selectedCtrlHelpFile()) Help.showHelp(self, Help.wxWinHelpFrame, url) else: Help.showHelp(self, Help.BoaHelpFrame, 'Inspector.html')
def OnHelp(self, event): if self.selDesgn: url = self.pages.extendHelpUrl(self.selectedCtrlHelpFile()) Help.showHelp(self, Help.wxWinHelpFrame, url) else: Help.showHelp(self, Help.BoaHelpFrame, 'Inspector.html')
29,346
def renumber(self, from_line, increment): if self.lineno > from_line: self.lineno = self.lineno + increment
def renumber(self, from_line, increment): if self.lineno > from_line: self.lineno = self.lineno + increment
29,347
def addMethod(self, class_name, method_name, method_params, method_body, to_bottom = 1): new_length = len(method_body) + 2 if not method_body: return a_class = self.classes[class_name]
def addMethod(self, class_name, method_name, method_params, method_body, to_bottom = 1): new_length = len(method_body) + 2 if not method_body: return a_class = self.classes[class_name]
29,348
def addMethod(self, class_name, method_name, method_params, method_body, to_bottom = 1): new_length = len(method_body) + 2 if not method_body: return a_class = self.classes[class_name]
def addMethod(self, class_name, method_name, method_params, method_body, to_bottom = 1): new_length = len(method_body) + 2 if not method_body: return a_class = self.classes[class_name]
29,349
def addMethod(self, class_name, method_name, method_params, method_body, to_bottom = 1): new_length = len(method_body) + 2 if not method_body: return a_class = self.classes[class_name]
def addMethod(self, class_name, method_name, method_params, method_body, to_bottom = 1): new_length = len(method_body) + 2 if not method_body: return a_class = self.classes[class_name]
29,350
pre_blank + [' def %s(%s):' % (method_name, method_params)] + \
pre_blank + [' def %s(%s):' % (method_name, method_params)] + \
29,351
def getModuleDoc(self): """ Return doc string for module. Scan the area from the start of the file up to the first occurence of a doc string containing structure like func or class """ if len(self.class_order): classStart = self.classes[self.class_order[0]].block.start -1 else: classStart = len(self.source)
def getModuleDoc(self): """ Return doc string for module. Scan the area from the start of the file up to the first occurence of a doc string containing structure like func or class """ if self.class_order: classStart = self.classes[self.class_order[0]].block.start -1 else: classStart = len(self.source)
29,352
def getModuleDoc(self): """ Return doc string for module. Scan the area from the start of the file up to the first occurence of a doc string containing structure like func or class """ if len(self.class_order): classStart = self.classes[self.class_order[0]].block.start -1 else: classStart = len(self.source)
def getModuleDoc(self): """ Return doc string for module. Scan the area from the start of the file up to the first occurence of a doc string containing structure like func or class """ if len(self.class_order): classStart = self.classes[self.class_order[0]].block.start -1 else: classStart = len(self.source)
29,353
def getModuleDoc(self): """ Return doc string for module. Scan the area from the start of the file up to the first occurence of a doc string containing structure like func or class """ if len(self.class_order): classStart = self.classes[self.class_order[0]].block.start -1 else: classStart = len(self.source)
def getModuleDoc(self): """ Return doc string for module. Scan the area from the start of the file up to the first occurence of a doc string containing structure like func or class """ if len(self.class_order): classStart = self.classes[self.class_order[0]].block.start -1 else: classStart = len(self.source)
29,354
def getModuleDoc(self): """ Return doc string for module. Scan the area from the start of the file up to the first occurence of a doc string containing structure like func or class """ if len(self.class_order): classStart = self.classes[self.class_order[0]].block.start -1 else: classStart = len(self.source)
def getModuleDoc(self): """ Return doc string for module. Scan the area from the start of the file up to the first occurence of a doc string containing structure like func or class """ if len(self.class_order): classStart = self.classes[self.class_order[0]].block.start -1 else: classStart = len(self.source)
29,355
def getClassDoc(self, class_name): #delete all method bodies # XXX broken, returns first doc str in class
def getClassDoc(self, class_name): #delete all method bodies # XXX broken, returns first doc str in class
29,356
def getClassMethDoc(self, class_name, meth_name): """ Extract the doc string for a method """ cb = string.join(self.extractMethodBody(class_name, meth_name)) return self.searchDoc(cb)
def getClassMethDoc(self, class_name, meth_name): """ Extract the doc string for a method """ cb = string.join(self.extractMethodBody(class_name, meth_name)) return self.searchDoc(cb)
29,357
def addFunction(self, func_name, func_params, func_body):
def addFunction(self, func_name, func_params, func_body):
29,358
def getAttribs(self, cls, methsOnly=false): loopCls = cls lst = [] while loopCls: lst.extend(loopCls.methods.keys()) if not methsOnly: lst.extend(loopCls.attributes.keys())
def getAttribs(self, cls, methsOnly=false): loopCls = cls lst = [] while loopCls: lst.extend(loopCls.methods.keys()) if not methsOnly: lst.extend(loopCls.attributes.keys())
29,359
def importExplorers(self, conf): """ Import names defined in the config files to register them """ installedTransports = ['Explorers.PrefsExplorer'] + \ eval(conf.get('explorer', 'installedtransports'))
def importExplorers(self, conf): """ Import names defined in the config files to register them """ installTransports = ['Explorers.PrefsExplorer'] + \ eval(conf.get('explorer', 'installedtransports'))
29,360
def importExplorers(self, conf): """ Import names defined in the config files to register them """ installedTransports = ['Explorers.PrefsExplorer'] + \ eval(conf.get('explorer', 'installedtransports'))
def importExplorers(self, conf): """ Import names defined in the config files to register them """ installedTransports = ['Explorers.PrefsExplorer'] + \ eval(conf.get('explorer', 'installedtransports'))
29,361
def importExplorers(self, conf): """ Import names defined in the config files to register them """ installedTransports = ['Explorers.PrefsExplorer'] + \ eval(conf.get('explorer', 'installedtransports'))
def importExplorers(self, conf): """ Import names defined in the config files to register them """ installedTransports = ['Explorers.PrefsExplorer'] + \ eval(conf.get('explorer', 'installedtransports'))
29,362
def OnEndLabelEdit(self, event): newText = event.GetText() renameNode = self.list.getSelection() assert renameNode, 'There must be a selection to rename' oldURI = renameNode.getURI() if newText != self.oldLabelVal: event.Skip() self.list.node.renameItem(self.oldLabelVal, newText) self.list.refreshCurrent() self.list.se...
def OnEndLabelEdit(self, event): newText = event.GetText() renameNode = self.list.getSelection() assert renameNode, 'There must be a selection to rename' oldURI = renameNode.getURI() if newText != self.oldLabelVal: event.Skip() self.list.node.renameItem(self.oldLabelVal, newText) self.list.refreshCurrent() self.list.se...
29,363
def spawnChild(monitor, process, args=''): """Returns an xmlrpclib.Server, a connection to an xml-rpc server, and the input and error streams. """ # Start ChildProcessServerStart.py in a new process. script_fn = os.path.join(os.path.dirname(__file__), 'ChildProcessServerStart.py') os.environ['PYTHONPATH'] = string.join...
def spawnChild(monitor, process, args=''): """Returns an xmlrpclib.Server, a connection to an xml-rpc server, and the input and error streams. """ # Start ChildProcessServerStart.py in a new process. script_fn = os.path.join(os.path.dirname(__file__), 'ChildProcessServerStart.py') os.environ['PYTHONPATH'] = string.join...
29,364
def run_tcpwatch(port1, port2): os.system("tcpwatch -L %d:%d" % (int(port1), int(port2)))
def run_tcpwatch(port1, port2): os.system("tcpwatch -L %d:%d" % (int(port1), int(port2)))
29,365
elif line[:5] == '\tdef ': meth = line[5:string.find(line, '(', 6)] currMeth = [meth] methList.append(currMeth)
elif line[:5] == '\tdef ': meth = line[5:string.find(line, '(', 6)] currMeth = [meth] methList.append(currMeth)
29,366
def dontPersistProps(self): # skip the code that removes ClientSize from the 'remove' list return ContainerDTC.dontPersistProps(self)
def dontPersistProps(self): # skip the code that removes ClientSize from the 'remove' list return ContainerDTC.dontPersistProps(self)
29,367
def OnfgColCombobox(self, event): print event.GetString() try: self.editColTCProp(self.fgColCb, self.fgColBtn, 'fore', event.GetString()) except AssertionError: wxLogError('Not a valid colour value')
def OnfgColCombobox(self, event): try: self.editColTCProp(self.fgColCb, self.fgColBtn, 'fore', event.GetString()) except AssertionError: wxLogError('Not a valid colour value')
29,368
def OnDblClick(evt, stc=stc): dlg = STCStyleEditDlg(None, 'Python', 'python', config, (stc,)) try: dlg.ShowModal() finally: dlg.Destroy()
def OnDblClick(evt, stc=stc): dlg = STCStyleEditDlg(None, 'Python', 'python', config, (stc,)) try: dlg.ShowModal() finally: dlg.Destroy()
29,369
def destroy(self): del self.images
def destroy(self): del self.images
29,370
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))
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,371
def addNewView(self, name, View): return createFramedView(name, View, self.model, self.parent, (400, 200))[1]
def addNewView(self, name, View): return createFramedView(name, View, self.model, self.parent, (400, 200))[1]
29,372
def spawnChild(monitor, process, args=''): """Returns an xmlrpclib.Server, a connection to an xml-rpc server, and the input and error streams. """ # Start ChildProcessServerStart.py in a new process. script_fn = os.path.join(os.path.dirname(__file__), 'ChildProcessServerStart.py') os.environ['PYTHONPATH'] = os.pathsep....
def spawnChild(monitor, process, args=''): """Returns an xmlrpclib.Server, a connection to an xml-rpc server, and the input and error streams. """ # Start ChildProcessServerStart.py in a new process. script_fn = os.path.join(os.path.dirname(__file__), 'ChildProcessServerStart.py') pyIntpPath = Preferences.getPythonInte...
29,373
def spawnChild(monitor, process, args=''): """Returns an xmlrpclib.Server, a connection to an xml-rpc server, and the input and error streams. """ # Start ChildProcessServerStart.py in a new process. script_fn = os.path.join(os.path.dirname(__file__), 'ChildProcessServerStart.py') os.environ['PYTHONPATH'] = os.pathsep....
def spawnChild(monitor, process, args=''): """Returns an xmlrpclib.Server, a connection to an xml-rpc server, and the input and error streams. """ # Start ChildProcessServerStart.py in a new process. script_fn = os.path.join(os.path.dirname(__file__), 'ChildProcessServerStart.py') os.environ['PYTHONPATH'] = os.pathsep....
29,374
def OnDebuggerStart(self, evt): try: wx.wxBeginBusyCursor() try: if self.server is None: # Start the subprocess. process = wx.wxProcess(self.event_handler, self.win_id) process.Redirect() self.process = process wx.EVT_END_PROCESS(self.event_handler, self.win_id, self.OnProcessEnded) (self.server, self.input_stream, sel...
def OnDebuggerStart(self, evt): try: wx.wxBeginBusyCursor() try: if self.server is None: # Start the subprocess. process = wx.wxProcess(self.event_handler, self.win_id) process.Redirect() self.process = process wx.EVT_END_PROCESS(self.event_handler, self.win_id, self.OnProcessEnded) (self.server, self.input_stream, sel...
29,375
def initialiser(self): return [' %s = []'%self.__class__.sourceObjName, '']
def initialiser(self): return [' %s = []'%self.__class__.sourceObjName, '']
29,376
def finaliser(self): return ['', ' return %s' %self.__class__.sourceObjName]
def finaliser(self): return ['', ' return %s' %self.__class__.sourceObjName]
29,377
def generateWindowId(self, idx): return
def generateWindowId(self, idx): return
29,378
## def __init__(self, name, designer, parentCompanion, ctrl):
## def __init__(self, name, designer, parentCompanion, ctrl):
29,379
def defaultAction(self): # select sub menu obj in data view pass
def defaultAction(self): # select sub menu obj in data view pass
29,380
def SetName(self, oldName, newName): CollectionDTC.SetName(self, oldName, newName)
def SetName(self, oldName, newName): CollectionDTC.SetName(self, oldName, newName)
29,381
def initialiser(self): return [' %s = wxLayoutConstraints()'%self.__class__.sourceObjName, '']
def initialiser(self): return [' %s = wxLayoutConstraints()'%self.__class__.sourceObjName, '']
29,382
def finaliser(self): return ['', ' return %s' %self.__class__.sourceObjName]
def finaliser(self): return ['', ' return %s' %self.__class__.sourceObjName]
29,383
def refresh(self): try: self.entries = eval(self.config.get(self.resourcepath[cat_section], self.resourcepath[cat_option])) except Exception, message: print 'invalid config entry for', self.resourcepath[cat_option], message self.entries = copy.copy(self.defaultstruct)
def refresh(self): try: self.entries = eval(self.config.get(self.resourcepath[cat_section], self.resourcepath[cat_option])) except Exception, message: print 'invalid config entry for', self.resourcepath[cat_option], message self.entries = copy.copy(self.defaultstruct)
29,384
def initScreenVars(): global screenWidth, screenHeight, wxDefaultFramePos, wxDefaultFrameSize global edWidth, inspWidth, paletteHeight, bottomHeight, underPalette screenWidth = wx.wxSystemSettings_GetSystemMetric(wx.wxSYS_SCREEN_X) screenHeight = wx.wxSystemSettings_GetSystemMetric(wx.wxSYS_SCREEN_Y) if wx.wxPlatform ...
def initScreenVars(): global screenWidth, screenHeight, wxDefaultFramePos, wxDefaultFrameSize global edWidth, inspWidth, paletteHeight, bottomHeight, underPalette global oglBoldFont, oglStdFont screenWidth = wx.wxSystemSettings_GetSystemMetric(wx.wxSYS_SCREEN_X) screenHeight = wx.wxSystemSettings_GetSystemMetric(wx.wx...
29,385
def setGrowables(self, rows, cols): self.textConstrLst = [] for idx, row in zip(range(len(rows)), rows): if row: self._appendItem('AddGrowableRow', idx) for idx, col in zip(range(len(rows)), cols): if col: self._appendItem('AddGrowableCol', idx)
def setGrowables(self, rows, cols): self.textConstrLst = [] for idx, row in zip(range(len(rows)), rows): if row: self._appendItem('AddGrowableRow', idx) for idx, col in zip(range(len(cols)), cols): if col: self._appendItem('AddGrowableCol', idx)
29,386
def defaultAction(self): pass
def defaultAction(self): pass
29,387
def OnInit(self): wxImage_AddHandler(wxJPEGHandler()) wxImage_AddHandler(wxPNGHandler()) wxImage_AddHandler(wxGIFHandler())
def OnInit(self): wxImage_AddHandler(wxJPEGHandler()) wxImage_AddHandler(wxPNGHandler()) wxImage_AddHandler(wxGIFHandler())
29,388
def main(): app = BoaApp(0) app.quit = false while not app.quit: app.MainLoop()
def main(): app = BoaApp(0) app.quit = false while not app.quit: app.MainLoop()
29,389
def refreshSplitter(self): s = wx.Size(self.GetClientSize().x, self.getHeight()) wOffset, hOffset = self.GetViewStart() puw, puh = self.GetScrollPixelsPerUnit() if hOffset and len(self.nameValues) < s.y /hOffset: hOffset = 0 self.splitter.SetDimensions(wOffset * puw, hOffset * puh * -1, s.x, s.y) self.updateScrollbars(...
def refreshSplitter(self): s = wx.Size(self.GetClientSize().x, self.getHeight()) wOffset, hOffset = self.GetViewStart() puw, puh = self.GetScrollPixelsPerUnit() if hOffset and len(self.nameValues) < s.y /hOffset: hOffset = 0 self.splitter.SetDimensions(wOffset * puw, hOffset * puh * -1, s.x, s.y) self.updateScrollbars(...
29,390
def getTipValue(self, word, lnNo): """ Overwritten Mixin method, returns string to display as tool tip """ module = self.model.getModule() objPth = word.split('.') safesplit = methodparse.safesplitfields
def getTipValue(self, word, lnNo): """ Overwritten Mixin method, returns string to display as tool tip """ module = self.model.getModule() objPth = word.split('.') safesplit = methodparse.safesplitfields
29,391
def runInThread(self, filename, args, app, interpreterPath, inpLines=[]): cwd = os.path.abspath(os.getcwd()) newCwd = os.path.dirname(os.path.abspath(filename)) os.chdir(newCwd) try: cmd = '"%s" %s %s'%(interpreterPath, os.path.basename(filename), args)
def runInThread(self, filename, args, interpreterPath, inpLines=[], execStart=None, execFinish=None): cwd = os.path.abspath(os.getcwd()) newCwd = os.path.dirname(os.path.abspath(filename)) os.chdir(newCwd) try: cmd = '"%s" %s %s'%(interpreterPath, os.path.basename(filename), args)
29,392
def runInThread(self, filename, args, app, interpreterPath, inpLines=[]): cwd = os.path.abspath(os.getcwd()) newCwd = os.path.dirname(os.path.abspath(filename)) os.chdir(newCwd) try: cmd = '"%s" %s %s'%(interpreterPath, os.path.basename(filename), args)
def runInThread(self, filename, args, app, interpreterPath, inpLines=[]): cwd = os.path.abspath(os.getcwd()) newCwd = os.path.dirname(os.path.abspath(filename)) os.chdir(newCwd) try: cmd = '"%s" %s %s'%(interpreterPath, os.path.basename(filename), args)
29,393
def run(self, args = ''): """ Excecute the current saved image of the application. """ if self.savedAs: filename = self.assertLocalFile()
def run1(self, args = '', execStart=None, execFinish=None): """ Excecute the current saved image of the application. """ if self.savedAs: filename = self.assertLocalFile()
29,394
def run(self, args = ''): """ Excecute the current saved image of the application. """ if self.savedAs: filename = self.assertLocalFile()
def run(self, args = ''): """ Excecute the current saved image of the application. """ if self.savedAs: filename = self.assertLocalFile()
29,395
def compile(self): import ModRunner oldErr = sys.stderr sys.stderr = ErrorStack.RecFile() try: cmr = ModRunner.CompileModuleRunner(self.editor.erroutFrm, self.app) cmr.run(self.filename, self.data+'\n\n', self.modified)
def compile(self): import ModRunner oldErr = sys.stderr sys.stderr = ErrorStack.RecFile() try: cmr = ModRunner.CompileModuleRunner(self.editor.erroutFrm) cmr.run(self.filename, self.data+'\n\n', self.modified)
29,396
def cyclops(self): """ Run the saved application thru Cyclops """ if self.savedAs: cwd = os.path.abspath(os.getcwd()) filename = self.assertLocalFile() os.chdir(os.path.dirname(filename)) page = '' try: name = os.path.basename(filename) report = tempfile.mktemp()
def cyclops(self, args='', execStart=None, execFinish=None): """ Run the saved application thru Cyclops """ if self.savedAs: cwd = os.path.abspath(os.getcwd()) filename = self.assertLocalFile() os.chdir(os.path.dirname(filename)) page = '' try: name = os.path.basename(filename) report = tempfile.mktemp()
29,397
def profile(self): filename = self.assertLocalFile() #statFile = os.path.splitext(filename)[0]+'.prof' statFile = tempfile.mktemp() if os.path.exists(statFile): modtime = os.stat(statFile)[stat.ST_MTIME] else: modtime = None profDir = os.path.dirname(filename)
def profile(self): filename = self.assertLocalFile() #statFile = os.path.splitext(filename)[0]+'.prof' statFile = tempfile.mktemp() if os.path.exists(statFile): modtime = os.stat(statFile)[stat.ST_MTIME] else: modtime = None profDir = os.path.dirname(filename)
29,398
def findImports(self): impPos = self.data.find(sourceconst.defImport) impPos = self.data.find('import', impPos + 1)
def findImports(self): impPos = self.data.find(sourceconst.defImport.strip()) impPos = self.data.find('import', impPos + 1)
29,399