rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
label='Options', name='optionsSB', parent=self, pos=wxPoint(128, 103), size=wxSize(136, 158), style=0) | label='Options', name='optionsSB', parent=self, pos=wxPoint(120, 103), size=wxSize(144, 158), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
pos=wxPoint(136, 120), size=wxSize(120, 19), style=0) | pos=wxPoint(125, 120), size=wxSize(120, 19), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
pos=wxPoint(136, 138), size=wxSize(120, 19), style=0) | pos=wxPoint(125, 138), size=wxSize(120, 19), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
pos=wxPoint(136, 156), size=wxSize(120, 19), style=0) | pos=wxPoint(125, 156), size=wxSize(120, 19), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
pos=wxPoint(136, 174), size=wxSize(120, 19), style=0) | pos=wxPoint(125, 174), size=wxSize(131, 19), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
label='Wrap search', name='wrapCB', parent=self, pos=wxPoint(136, | label='Wrap search', name='wrapCB', parent=self, pos=wxPoint(125, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
pos=wxPoint(136, 211), size=wxSize(120, 19), style=0) | pos=wxPoint(125, 211), size=wxSize(120, 19), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
pos=wxPoint(136, 233), size=wxSize(120, 13), style=0) | pos=wxPoint(125, 233), size=wxSize(120, 14), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
name='findBtn', parent=self, pos=wxPoint(274, 106), size=wxSize(82, 23), style=0) | name='findBtn', parent=self, pos=wxPoint(270, 101), size=wxSize(83, 23), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
label='Find all', name='findAllBtn', parent=self, pos=wxPoint(274, 133), size=wxSize(82, 23), style=0) | label='Find all', name='findAllBtn', parent=self, pos=wxPoint(270, 129), size=wxSize(84, 23), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
pos=wxPoint(274, 160), size=wxSize(82, 23), style=0) | pos=wxPoint(270, 156), size=wxSize(84, 23), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
label='Replace', name='replaceBtn', parent=self, pos=wxPoint(274, 187), size=wxSize(82, 23), style=0) | label='Replace', name='replaceBtn', parent=self, pos=wxPoint(270, 183), size=wxSize(83, 23), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
pos=wxPoint(274, 214), size=wxSize(82, 23), style=0) | pos=wxPoint(270, 210), size=wxSize(83, 23), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
label='Cancel', name='cancelBtn', parent=self, pos=wxPoint(274, 242), size=wxSize(82, 23), style=0) | label='Cancel', name='cancelBtn', parent=self, pos=wxPoint(270, 238), size=wxSize(83, 23), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
label='...', name='btnBuildInFind', parent=self, pos=wxPoint(339, 4), size=wxSize(19, 21), style=0) | label='...', name='btnBuildInFind', parent=self, pos=wxPoint(329, 4), size=wxSize(27, 21), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
name='btnBrowse', parent=self, pos=wxPoint(339, 51), size=wxSize(19, 21), style=0) | name='btnBrowse', parent=self, pos=wxPoint(329, 51), size=wxSize(27, 21), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FINDREPLACEDLG, name='FindReplaceDlg', parent=prnt, pos=wxPoint(399, 399), size=wxSize(372, 300), style=wxDEFAULT_DIALOG_STYLE, title='Find/Replace') self._init_utils() self.SetAutoLayout(true) self.SetClientSize(wxSize(364, 273... |
for x in range(67, 90): | for x in range(ord('C'), ord('Z')+1): | def __init__(self, clipboard, config, parent, bookmarks): ExplorerNodes.CategoryNode.__init__(self, 'Filesystem', ('explorer', 'file'), clipboard, config, parent) self.bookmarks = bookmarks |
self.flex.Add(self.colBtns[idx], 0, wxGROW) | self.flex.Add(self.colBtns[idx], 0, wx.GROW) | def setupFlexSizer(self): self.boxSizer1.Remove(0) self.flex =wx.FlexGridSizer(cols=self.numCols, hgap=0, rows=self.numRows, vgap=0) self.boxSizer1.Insert(0, self.flex, 1, border=0, flag=wx.GROW | wx.ALL) |
self.flex.Add(self.rowBtns[idx], 0, wxGROW) | self.flex.Add(self.rowBtns[idx], 0, wx.GROW) | def setupFlexSizer(self): self.boxSizer1.Remove(0) self.flex =wx.FlexGridSizer(cols=self.numCols, hgap=0, rows=self.numRows, vgap=0) self.boxSizer1.Insert(0, self.flex, 1, border=0, flag=wx.GROW | wx.ALL) |
wxPostEvent(self, wx.SizeEvent(self.GetSize(), self.GetId())) | wx.PostEvent(self, wx.SizeEvent(self.GetSize(), self.GetId())) | def setupFlexSizer(self): self.boxSizer1.Remove(0) self.flex =wx.FlexGridSizer(cols=self.numCols, hgap=0, rows=self.numRows, vgap=0) self.boxSizer1.Insert(0, self.flex, 1, border=0, flag=wx.GROW | wx.ALL) |
self.finaliseDepLinks(depLnks) | def refreshCtrl(self): if self.destroying: return | |
self.model.views['Source'].SetReadOnly(false) | self.model.views['Source'].disableSource(false) | def OnCloseWindow(self, event): self.destroying = true if self.selection: self.selection.destroy() self.selection = None elif self.multiSelection: for sel in self.multiSelection: sel.destroy() self.multiSelection = None |
print 'OnControlDelete' | def OnControlDelete(self, event): print 'OnControlDelete' ctrls = [] if self.selection: ctrls = [self.selection.name] elif self.multiSelection: ctrls = map(lambda sel: sel.name, self.multiSelection) #map(self.deleteCtrl, ctrls) for ctrlName in ctrls: self.deleteCtrl(ctrlName) | |
dlg = ProcessProgressDlg.ProcessProgressDlg(None, cmd, caption, autoClose) | dlg = ProcessProgressDlg.ProcessProgressDlg(None, cmd, caption, autoClose=autoClose) | def run(self, cmd, Parser = ErrorStack.StdErrErrorParser, caption='Execute module', root='Error', autoClose = false): import ProcessProgressDlg dlg = ProcessProgressDlg.ProcessProgressDlg(None, cmd, caption, autoClose) try: dlg.ShowModal() serr = ErrorStack.buildErrorList(dlg.errors, Parser) if len(serr): return self.c... |
return '%s%s%d' % (self.name, self.propName, self.index) | base = self.newWinId('') itemId = self.GetItemId(None)[len(base):].capitalize() return '%s%s' % (self.name, itemId) | def evtName(self): return '%s%s%d' % (self.name, self.propName, self.index) |
class ZopeHTMLSourceView(EditorStyledTextCtrl, ZopeHTMLStyledTextCtrlMix, DebuggingViewSTCMix): | class ZopeHTMLSourceView(EditorStyledTextCtrl, ZopeHTMLStyledTextCtrlMix): | def __init__(self, wId): BaseHTMLStyledTextCtrlMix.__init__(self, wId) |
('+View whitespace', self.OnViewWhitespace, '-', ()), ('+View EOL characters', self.OnViewEOL, '-', ()), ('-', None, '-', ()), | def __init__(self, parent, model): a1 = (('-', None, '', ()), ('Comment', self.OnComment, '-', keyDefs['Comment']), ('Uncomment', self.OnUnComment, '-', keyDefs['Uncomment']), ('Indent', self.OnIndent, '-', keyDefs['Indent']), ('Dedent', self.OnDedent, '-', keyDefs['Dedent']), ('-', None, '-', ()), ('Run to cursor', se... | |
PythonStyledTextCtrlMix.__init__(self, wxID_PYTHONSOURCEVIEW, 0) BrowseStyledTextCtrlMix.__init__(self) FoldingStyledTextCtrlMix.__init__(self, wxID_PYTHONSOURCEVIEW, 2) | PythonStyledTextCtrlMix.__init__(self, wxID_PYTHONSOURCEVIEW, (lineNoMrg, Preferences.STCLineNumMarginWidth)) BrowseStyledTextCtrlMix.__init__(self, brwsIndc) FoldingStyledTextCtrlMix.__init__(self, wxID_PYTHONSOURCEVIEW, foldMrg) | def __init__(self, parent, model): a1 = (('-', None, '', ()), ('Comment', self.OnComment, '-', keyDefs['Comment']), ('Uncomment', self.OnUnComment, '-', keyDefs['Uncomment']), ('Indent', self.OnIndent, '-', keyDefs['Indent']), ('Dedent', self.OnDedent, '-', keyDefs['Dedent']), ('-', None, '-', ()), ('Run to cursor', se... |
filename = string.lower(self.model.filename) | filename = os.path.normcase(self.model.filename) | def __init__(self, parent, model): a1 = (('-', None, '', ()), ('Comment', self.OnComment, '-', keyDefs['Comment']), ('Uncomment', self.OnUnComment, '-', keyDefs['Uncomment']), ('Indent', self.OnIndent, '-', keyDefs['Indent']), ('Dedent', self.OnDedent, '-', keyDefs['Dedent']), ('-', None, '-', ()), ('Run to cursor', se... |
self.SetMarginType(1, wxSTC_MARGIN_SYMBOL) self.SetMarginWidth(1, 12) self.SetMarginSensitive(1, true) self.MarkerDefine(brkPtMrk, wxSTC_MARK_CIRCLE, 'BLACK', 'RED') self.MarkerDefine(stepPosMrk, wxSTC_MARK_SHORTARROW, 'NAVY', 'BLUE') self.MarkerDefine(tmpBrkPtMrk, wxSTC_MARK_CIRCLE, 'BLACK', 'BLUE') self.CallTipSetBac... | self.SetMarginType(symbolMrg, wxSTC_MARGIN_SYMBOL) self.SetMarginWidth(symbolMrg, Preferences.STCSymbolMarginWidth) self.SetMarginSensitive(symbolMrg, true) markIdnt, markBorder, markCenter = Preferences.STCBreakpointMarker self.MarkerDefine(brkPtMrk, markIdnt, markBorder, markCenter) markIdnt, markBorder, markCenter =... | def __init__(self, parent, model): a1 = (('-', None, '', ()), ('Comment', self.OnComment, '-', keyDefs['Comment']), ('Uncomment', self.OnUnComment, '-', keyDefs['Uncomment']), ('Indent', self.OnIndent, '-', keyDefs['Indent']), ('Dedent', self.OnDedent, '-', keyDefs['Dedent']), ('-', None, '-', ()), ('Run to cursor', se... |
self.IndicatorSetStyle(1, wxSTC_INDIC_SQUIGGLE) self.IndicatorSetForeground(1, wxRED) self.SetBufferedDraw(true) | self.SetIndentationGuides(Preferences.STCIndentationGuides) | def __init__(self, parent, model): a1 = (('-', None, '', ()), ('Comment', self.OnComment, '-', keyDefs['Comment']), ('Uncomment', self.OnUnComment, '-', keyDefs['Uncomment']), ('Indent', self.OnIndent, '-', keyDefs['Indent']), ('Dedent', self.OnDedent, '-', keyDefs['Dedent']), ('-', None, '-', ()), ('Run to cursor', se... |
def processComment(self, textLst): | def processComment(self, textLst, idntBlock): | def processComment(self, textLst): return map(lambda l: '##%s'%l, textLst) |
def processUncomment(self, textLst): | def processUncomment(self, textLst, idntBlock): | def processUncomment(self, textLst): for idx in range(len(textLst)): if len(textLst[idx]) >= 2 and textLst[idx][:2] == '##': textLst[idx] = textLst[idx][2:] return textLst |
def processIndent(self, textLst): return map(lambda l: '%s%s'%(indentLevel*' ', l), textLst) def processDedent(self, textLst): | def processIndent(self, textLst, idntBlock): return map(lambda l, idntBlock=idntBlock: '%s%s'%(idntBlock, l), textLst) def processDedent(self, textLst, idntBlock): indentLevel=len(idntBlock) | def processIndent(self, textLst): return map(lambda l: '%s%s'%(indentLevel*' ', l), textLst) |
textLst[idx][:indentLevel] == indentLevel*' ': | textLst[idx][:indentLevel] == idntBlock: | def processDedent(self, textLst): for idx in range(len(textLst)): if len(textLst[idx]) >= indentLevel and \ textLst[idx][:indentLevel] == indentLevel*' ': textLst[idx] = textLst[idx][indentLevel:] return textLst |
cls.functions[objPth[0]].signature) | module.functions[objPth[0]].signature) | def getTipValue(self, word, lnNo): """ Overwritten Mixin method, returns string to display as tool tip """ module = self.model.getModule() objPth = string.split(word, '.') safesplit = methodparse.safesplitfields |
srchpath = [os.path.dirname(self.model.filename)] if self.model.app: srchpath.insert(0, os.path.dirname(self.model.app.filename)) | def BrowseClick(self, word, line, lineNo, start, style): """ Overridden from BrowseStyledTextCtrlMix, jumps to declaration or opens module | |
mod = self.model.editor.openOrGotoModule(obj.__init__.im_func.func_code.co_filename) | path = os.path.abspath(obj.__init__.im_func.func_code.co_filename) mod, cntrl = self.model.editor.openOrGotoModule(path) | def BrowseClick(self, word, line, lineNo, start, style): """ Overridden from BrowseStyledTextCtrlMix, jumps to declaration or opens module |
mod = self.model.editor.openOrGotoModule(obj.func_code.co_filename) | path = os.path.abspath(obj.func_code.co_filename) mod, cntrl = self.model.editor.openOrGotoModule(path) | def BrowseClick(self, word, line, lineNo, start, style): """ Overridden from BrowseStyledTextCtrlMix, jumps to declaration or opens module |
self.IndicatorSetForeground(0, wxRED) | self.IndicatorSetForeground(0, Preferences.STCDebugBrowseColour) | def underlineWord(self, start, length): start, length = BrowseStyledTextCtrlMix.underlineWord(self, start, length) debugger = self.model.editor.debugger if Preferences.useDebugger == 'new': start, length = BrowseStyledTextCtrlMix.underlineWord( self, start, length) debugger = self.model.editor.debugger if debugger: wor... |
self.IndicatorSetForeground(0, wxBLUE) | self.IndicatorSetForeground(0, Preferences.STCCodeBrowseColour) | def underlineWord(self, start, length): start, length = BrowseStyledTextCtrlMix.underlineWord(self, start, length) debugger = self.model.editor.debugger if Preferences.useDebugger == 'new': start, length = BrowseStyledTextCtrlMix.underlineWord( self, start, length) debugger = self.model.editor.debugger if debugger: wor... |
filename = self.model.filename | filename = self.model.assertLocalFile() | def deleteBreakPoint(self, lineNo): if Preferences.useDebugger == 'new': self.breaks.deleteBreakpoints(lineNo) debugger = self.model.editor.debugger if debugger: # Try to apply to the running debugger. filename = self.model.filename #string.lower(self.model.filename) debugger.deleteBreakpoints(filename, lineNo) self.Ma... |
if bp.temporary: self.MarkerDelete(lineNo - 1, tmpBrkPtMrk) else: self.MarkerDelete(lineNo - 1, brkPtMrk) | self.MarkerDelete(lineNo - 1, tmpBrkPtMrk) self.MarkerDelete(lineNo - 1, brkPtMrk) | def deleteBreakPoint(self, lineNo): if Preferences.useDebugger == 'new': self.breaks.deleteBreakpoints(lineNo) debugger = self.model.editor.debugger if debugger: # Try to apply to the running debugger. filename = self.model.filename #string.lower(self.model.filename) debugger.deleteBreakpoints(filename, lineNo) self.Ma... |
filename = self.model.filename | def addBreakPoint(self, lineNo, temp=0, notify_debugger=1): if Preferences.useDebugger == 'new': self.breaks.addBreakpoint(lineNo, temp) if notify_debugger: debugger = self.model.editor.debugger if debugger: # Try to apply to the running debugger. filename = self.model.filename debugger.setBreakpoint(filename, lineNo, ... | |
if wxPlatform == '__WXMSW__': filename = string.lower(self.model.filename) else: filename = self.model.filename | def addBreakPoint(self, lineNo, temp=0, notify_debugger=1): if Preferences.useDebugger == 'new': self.breaks.addBreakpoint(lineNo, temp) if notify_debugger: debugger = self.model.editor.debugger if debugger: # Try to apply to the running debugger. filename = self.model.filename debugger.setBreakpoint(filename, lineNo, ... | |
if event.GetMargin() == 1: | if event.GetMargin() == symbolMrg: | def OnMarginClick(self, event): if event.GetMargin() == 1: lineClicked = self.LineFromPosition(event.GetPosition()) + 1 if Preferences.useDebugger == 'old': if self.breaks.has_key(lineClicked): self.deleteBreakPoint(lineClicked) else: self.addBreakPoint(lineClicked) elif Preferences.useDebugger == 'new': if self.breaks... |
elif key == 9: self.AddText(indentLevel*' ') self.damagedLine = self.GetCurrentLine() if not self.AutoCompActive(): return | def OnKeyDown(self, event): if self.CallTipActive(): self.callTipCheck() | |
self.SetSelection(ls + st/4*4, pos+1) | self.SetSelection(ls + st/indtSze*indtSze, pos+1) | def OnKeyDown(self, event): if self.CallTipActive(): self.callTipCheck() |
def OnTranslate(self, event): import TranslateDlg dlg = TranslateDlg.create(None, self.GetSelectedText()) try: if dlg.ShowModal() == wxOK and len(dlg.translated) > 1: self.ReplaceSelection(dlg.translated[1]) finally: dlg.Destroy() | def OnFixPaste(self, event): self.Undo() self.AddText(event.newtext) | |
svnChd = tree.getChildNamed(svnParentItemParent, 'SVN') | svnChd = tree.getChildNamed(svnParentItemParent, '.svn') | def openParent(self, editor): tree = editor.explorer.tree svnParentItemParent = tree.GetItemParent(tree.GetItemParent(tree.GetSelection())) |
break | if not hasattr(self.designer.model.specialAttrs['self'], oRf): break | def writeDependencies(self, output, ctrlName, depLinks, definedCtrls, stripFrmId=''): """ Write out dependent properties if all the ctrls they reference have been created. """ if depLinks.has_key(ctrlName): for prop, otherRefs in depLinks[ctrlName]: for oRf in otherRefs: if oRf not in definedCtrls: break else: output.a... |
suppressWindowId = false | def __init__(self, name, designer, parent, ctrlClass): raise 'Not Implemented' | |
return eval(self.textConstrLst[self.index].params[self.displayProp], self.designer.model.specialAttrs) | return self.eval(self.textConstrLst[self.index].params[self.displayProp]) | def getDisplayProp(self): return eval(self.textConstrLst[self.index].params[self.displayProp], self.designer.model.specialAttrs) |
elif type(Win) is types.InstanceType: | elif isinstance(Win, wxWindow): | def wxProxyPanel(parent, Win, *args, **kwargs): """ Function which put's a panel in between two controls. Mainly for better repainting under GTK. Based on a pattern by Kevin Gill. """ panel = wxPanel(parent, -1, style=wxTAB_TRAVERSAL | wxCLIP_CHILDREN) if type(Win) is types.ClassType or type(Win) is types.TypeType: w... |
self.Update( newmsg = desc ) | self.Update(-1, newmsg = desc ) | def SetDescription(self, desc, maxticks = None): self.Update( newmsg = desc ) |
def safesplitfields(params, delim): | def safesplitfields(params, delim, returnBlanks = 0, containBegin=containBegin, containEnd=containEnd): | def safesplitfields(params, delim): """ Returns a list of parameters split on delim but not if delim are within containers (), {}, [], '', "" Also skip '', "" content """ locparams = params list = [] i = 0 nestlevel = 0 singlequotelevel = 0 doublequotelevel = 0 if not params: return [''] while i < len(locparams): c... |
if not params: return [''] | if returnBlanks and not string.strip(params): return [params] | def safesplitfields(params, delim): """ Returns a list of parameters split on delim but not if delim are within containers (), {}, [], '', "" Also skip '', "" content """ locparams = params list = [] i = 0 nestlevel = 0 singlequotelevel = 0 doublequotelevel = 0 if not params: return [''] while i < len(locparams): c... |
return cat | else: unmatched.append(line) return cat, unmatched | def parseMixedBody(parseClasses, lines): """ Return a dictionary with keys representing classes that 'understood' the line and values a list of found instances of the found class """ cat = {} for parseClass in parseClasses: cat[parseClass] = [] for line in lines: ln = string.strip(line) if (ln == 'pass') or (ln == '')... |
for key in params.keys(): kvlist.append(key+' = '+params[key]) | sortedkeys = params.keys() sortedkeys.sort() for key in sortedkeys: kvlist.append(key+param_splitter+params[key]) | def KVParamsAsText(self, params): kvlist = [] for key in params.keys(): kvlist.append(key+' = '+params[key]) return string.join(kvlist, ', ') |
sys.stderr.write("'''" + str(sys.exc_type) + " : " + \ str(sys.exc_value[0])+"'''\n") | sys.stderr.write("'''" + str(sys.exc_type) + \ str(sys.exc_value.args and (" : " +sys.exc_value[0]) or '')+"'''\n") | def showtraceback(self): |
showTip = conf.getint('tips', 'showonstartup') | showTip = conf.getboolean('tips', 'showonstartup') | def showTip(frame, forceShow=0): """ Displays tip of the day. Driven from and updates config file """ try: conf = createAndReadConfig('Explorer') except IOError: conf = None showTip, index = (1, 0) else: showTip = conf.getint('tips', 'showonstartup') index = conf.getint('tips', 'tipindex') if showTip or forceShow: tp... |
conf.set('tips', 'showonstartup', int(showTip)) conf.set('tips', 'tipindex', index) | conf.set('tips', 'showonstartup', showTip and 'true' or 'false') conf.set('tips', 'tipindex', str(index)) | def showTip(frame, forceShow=0): """ Displays tip of the day. Driven from and updates config file """ try: conf = createAndReadConfig('Explorer') except IOError: conf = None showTip, index = (1, 0) else: showTip = conf.getint('tips', 'showonstartup') index = conf.getint('tips', 'tipindex') if showTip or forceShow: tp... |
raise 'Unhandled type for Win' | raise Exception, 'Unhandled type for Win' | def wxProxyPanel(parent, Win, *args, **kwargs): """ Function which put's a panel in between two controls. Mainly for better repainting under GTK. Based on a pattern by Kevin Gill. """ panel = wx.Panel(parent, -1, style=wx.TAB_TRAVERSAL | wx.CLIP_CHILDREN) if type(Win) is types.ClassType or type(Win) is types.TypeType... |
raise 'get_exc_info' | Exception, 'get_exc_info' | def get_current_frame(): try: raise 'get_exc_info' except: return sys.exc_info()[2].tb_frame.f_back |
def stringToControl(s): | def stringToControl(s, safe=False): | def stringToControl(s): try: wx.USE_UNICODE, UnicodeError except (AttributeError, NameError): return s if wx.USE_UNICODE: try: return unicode(s) except UnicodeError, err: try: spec = coding_spec(s) return s.decode(spec) except UnicodeError, err: raise Exception, 'Unable to decode unicode string, please change '\ 'the ... |
return unicode(s) | if safe: return s.decode(sys.getdefaultencoding(), 'ignore') else: return unicode(s) | def stringToControl(s): try: wx.USE_UNICODE, UnicodeError except (AttributeError, NameError): return s if wx.USE_UNICODE: try: return unicode(s) except UnicodeError, err: try: spec = coding_spec(s) return s.decode(spec) except UnicodeError, err: raise Exception, 'Unable to decode unicode string, please change '\ 'the ... |
runner = wxPopenModuleRunner(None, newCwd) | runner = wxPopenModuleRunner(self.editor.erroutFrm, newCwd) | def run(self, args = '', execStart=None, execFinish=None): """ Excecute the current saved image of the application. """ if self.savedAs: filename = self.assertLocalFile() |
self.data = self.data[:start]+pprint.pformat(dct)+self.data[end:] | 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) self.data = self.data[:start]+pprint.pformat(dct)+self.data[end:] |
'HelpCompanions': [0, '', 'Companions/HelpCompanions.py'], | def get_current_frame(): try: 1 + '' # raise an exception except: return sys.exc_info()[2].tb_frame | |
'PrefsGTK': [0, 'Unix specific preference settings', 'PrefsGTK.py'], 'PrefsKeys': [0, 'Keyboard bindings', 'PrefsKeys.py'], 'PrefsMSW': [0, 'Windows specific preference settings', 'PrefsMSW.py'], | def get_current_frame(): try: 1 + '' # raise an exception except: return sys.exc_info()[2].tb_frame | |
print 'creating Palette' | def OnInit(self): wxInitAllImageHandlers() | |
self.SetTopWindow(self.main) self.main.inspector.Show(true) | inspector.Show(true) | def OnInit(self): wxInitAllImageHandlers() |
self.main.inspector.initSashes() self.main.editor.Show(true) | inspector.initSashes() editor.Show(true) self.SetTopWindow(editor) | def OnInit(self): wxInitAllImageHandlers() |
self.main.editor.shell.execStartupScript(startupfile) | editor.shell.execStartupScript(startupfile) | def OnInit(self): wxInitAllImageHandlers() |
self.main.editor.openOrGotoModule('README.txt') self.main.editor.openOrGotoModule('Changes.txt') | editor.openOrGotoModule('README.txt') editor.openOrGotoModule('Changes.txt') | def OnInit(self): wxInitAllImageHandlers() |
mod = self.main.editor.openModule(args[0]) | mod = editor.openModule(args[0]) | def OnInit(self): wxInitAllImageHandlers() |
self.main.editor.openModule(mod) | editor.openModule(mod) | def OnInit(self): wxInitAllImageHandlers() |
app = BoaApp(0) | try: app = BoaApp(0) except Exception, error: wxMessageBox(str(error), 'Error on startup') raise | def main(): app = BoaApp(0) app.quit = false while not app.quit: app.MainLoop() |
return ma*200+mi*20+re old_ver = ver_tot(2,2,1) | return ma*10000+mi*100+re old_ver = ver_tot(2,2,1) | def ver_tot(ma, mi, re): return ma*200+mi*20+re |
parent.AddPage(bSelect=true, imageId=-1, pPage=self.panel1, strText='Containers/Layout') parent.AddPage(bSelect=false, imageId=-1, pPage=self.panel2, strText='Basic Controls') parent.AddPage(bSelect=false, imageId=-1, pPage=self.panel3, strText='Buttons') parent.AddPage(bSelect=false, imageId=-1, pPage=self.panel4, str... | parent.AddPage(select=true, imageId=-1, page=self.panel1, text='Containers/Layout') parent.AddPage(select=false, imageId=-1, page=self.panel2, text='Basic Controls') parent.AddPage(select=false, imageId=-1, page=self.panel3, text='Buttons') parent.AddPage(select=false, imageId=-1, page=self.panel4, text='List Controls'... | def _init_coll_notebook1_Pages(self, parent): # generated method, don't edit |
if self._pid is not None: | if self._pid: | def OnDebuggerStopped(self, event): """Called when a debugger process stops.""" show_dialog = 0 if self.running: show_dialog = 1 self.killDebugger() if self._closing: # Close the window. self.destroy() self.Destroy() elif show_dialog: wxMessageBox('The debugger process stopped prematurely.', 'Debugger stopped', wxOK | ... |
self._erroutFrm.processStarted(intp, self._pid, script, 'Debug') | if intp: self._erroutFrm.processStarted(intp, self._pid, script, 'Debug') | def OnDebuggerOk(self, event): if self._destroyed: return |
self.locs = NamespaceViewCtrl(self.nbBottom, self.add_watch, 1, 'local') | self.locs = NamespaceViewCtrl(self.nbBottom, self, 1, 'local') | def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger', style=wxDEFAULT_FRAME_STYLE|wxCLIP_CHILDREN|Preferences.childFrameStyle) |
self.nbBottom, self.add_watch, 0, 'global') | self.nbBottom, self, 0, 'global') | def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger', style=wxDEFAULT_FRAME_STYLE|wxCLIP_CHILDREN|Preferences.childFrameStyle) |
self.editor.statusBar.setHint(val) | self.editor.setStatus(val) | def receiveVarValue(self, val): if val: self.editor.statusBar.setHint(val) |
del self.images | self.images = {} | def cleanup(self): del self.images |
import zipfile, tempfile | import zipfile | def addArchive(self, defaultArchive): import zipfile, tempfile zf = zipfile.ZipFile(path.join(self.rootpath, defaultArchive)) self.archives[defaultArchive] = map(lambda fl: fl.filename, zf.filelist) |
tmpname = tempfile.mktemp() open(tmpname, 'w').write(zf.read(img)) try: if not self.images.has_key(bmpPath): try: self.images[bmpPath] = self.createImage(tmpname, imgExt) except Exception, error: print 'Ext not handled', bmpPath, str(error) finally: os.remove(tmpname) zf.close() | self.images[bmpPath] = (img, imgExt) self.zipfile = zf | def addArchive(self, defaultArchive): import zipfile, tempfile zf = zipfile.ZipFile(path.join(self.rootpath, defaultArchive)) self.archives[defaultArchive] = map(lambda fl: fl.filename, zf.filelist) |
self.gauge.SetValue(cnt) | self.gauge.SetValue(min(self.gauge.GetRange(), cnt)) | def OnUpdateProgress(self, event): self._live = event.tpe == 'importing' and self._live if self.gauge: cnt = event.cnt if event.tpe == 'opening': cnt = cnt * self.fileOpeningFactor + self.moduleTotal self.gauge.SetValue(cnt) |
zf = self.ArchiveClass(self.zipFileNode.resourcepath, self.compression) | zf = self.ArchiveClass(self.zipFileNode.resourcepath, compression=self.compression) | def copyToFS(self, fsFolderNode): fn = os.path.join(fsFolderNode.resourcepath, self.name) |
zf = self.ArchiveClass(self.zipFileNode.resourcepath, 'r') | zf = self.ArchiveClass(self.zipFileNode.resourcepath) | def load(self, mode='rb'): zf = self.ArchiveClass(self.zipFileNode.resourcepath, 'r') try: return zf.read(self.resourcepath) finally: zf.close() |
def renameCtrl(self, oldName, newName): """ Rename control, references to control and update parent tree """ prel, pref = self.buildParentRelationship() | def renameCtrlAndParentRefs(self, oldName, newName, children=()): | def renameCtrl(self, oldName, newName): """ Rename control, references to control and update parent tree """ |
children = pref[oldName].keys() | def renameCtrl(self, oldName, newName): """ Rename control, references to control and update parent tree """ | |
def newControl(self, parent, ctrlClass, ctrlCompanion, position = None, size = None): | def newControl(self, parent, CtrlClass, CtrlCompanion, position = None, size = None): | def newControl(self, parent, ctrlClass, ctrlCompanion, position = None, size = None): """ At design time, when adding a new ctrl from the palette, create and register given control and companion. See also: loadControl """ ctrlName = self.newObjName(ctrlClass.__name__) |
ctrlName = self.newObjName(ctrlClass.__name__) self.checkHost(ctrlCompanion) companion = ctrlCompanion(ctrlName, self, parent, ctrlClass) | ctrlName = self.newObjName(CtrlClass.__name__) self.checkHost(CtrlCompanion) companion = CtrlCompanion(ctrlName, self, parent, CtrlClass) | def newControl(self, parent, ctrlClass, ctrlCompanion, position = None, size = None): """ At design time, when adding a new ctrl from the palette, create and register given control and companion. See also: loadControl """ ctrlName = self.newObjName(ctrlClass.__name__) |
companion.persistConstr(ctrlClass.__name__, params) | companion.persistConstr(CtrlClass.__name__, params) | def newControl(self, parent, ctrlClass, ctrlCompanion, position = None, size = None): """ At design time, when adding a new ctrl from the palette, create and register given control and companion. See also: loadControl """ ctrlName = self.newObjName(ctrlClass.__name__) |
if ctrl != self: | if ctrl and ctrl != self: | def selectParent(self, ctrl): """ Change the selection to the parent of the currently selected control. """ if self.selection or self.multiSelection: if self.multiSelection: self.clearMultiSelection() self.assureSingleSelection() |
def connectEvts(self, ctrl): EVT_MOTION(ctrl, self.OnMouseOver) EVT_LEFT_DOWN(ctrl, self.OnControlSelect) EVT_LEFT_UP(ctrl, self.OnControlRelease) EVT_LEFT_DCLICK(ctrl, self.OnControlDClick) EVT_SIZE(ctrl, self.OnControlResize) EVT_MOVE(ctrl, self.OnControlMove) | def connectEvts(self, ctrl, connectChildren=false): ctrls = [ctrl] if connectChildren: ctrls.extend(ctrl.GetChildren()) for ctrl in ctrls: EVT_MOTION(ctrl, self.OnMouseOver) EVT_LEFT_DOWN(ctrl, self.OnControlSelect) EVT_LEFT_UP(ctrl, self.OnControlRelease) EVT_LEFT_DCLICK(ctrl, self.OnControlDClick) EVT_SIZE(ctrl, self... | def connectEvts(self, ctrl): EVT_MOTION(ctrl, self.OnMouseOver) EVT_LEFT_DOWN(ctrl, self.OnControlSelect) EVT_LEFT_UP(ctrl, self.OnControlRelease) EVT_LEFT_DCLICK(ctrl, self.OnControlDClick) EVT_SIZE(ctrl, self.OnControlResize) EVT_MOVE(ctrl, self.OnControlMove) |
ctrl = event.GetEventObject() if not ctrl: ctrl = dsgn if dsgn.selectControlByPos(ctrl, event.GetPosition(), event.ShiftDown()): | ctrl, pos = self.getCtrlAndPosFromEvt(event) if dsgn.selectControlByPos(ctrl, pos, event.ShiftDown()): | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ dsgn = self.designer ctrl = event.GetEventObject() # XXX only here for when testing if not ctrl: ctrl = dsgn |
ctrl = event.GetEventObject() dsgn.selectControlByPos(ctrl, event.GetPosition(), event.ShiftDown()) | ctrl, pos = self.getCtrlAndPosFromEvt(event) dsgn.selectControlByPos(ctrl, pos, event.ShiftDown()) | def OnControlDClick(self, event): dsgn = self.designer |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.