bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def setSTCStyles(stc, styles, styleIdNames, commonDefs, lang, lexer, keywords): #wxLogMessage('Set style') styleDict = {} styleNumIdxMap = {} # build style dict based on given styles for numStyle in styles: num, style = parsePropLine(numStyle) styleDict[num] = style # Add blank style entries for undefined styles newS...
def setSTCStyles(stc, styles, styleIdNames, commonDefs, lang, lexer, keywords): #wxLogMessage('Set style') styleDict = {} styleNumIdxMap = {} # build style dict based on given styles for numStyle in styles: num, style = parsePropLine(numStyle) styleDict[num] = style # Add blank style entries for undefined styles newS...
31,500
def setSTCStyles(stc, styles, styleIdNames, commonDefs, lang, lexer, keywords): #wxLogMessage('Set style') styleDict = {} styleNumIdxMap = {} # build style dict based on given styles for numStyle in styles: num, style = parsePropLine(numStyle) styleDict[num] = style # Add blank style entries for undefined styles newS...
defsetSTCStyles(stc,styles,styleIdNames,commonDefs,lang,lexer,keywords):#wxLogMessage('Setstyle')styleDict={}styleNumIdxMap={}#buildstyledictbasedongivenstylesfornumStyleinstyles:num,style=parsePropLine(numStyle)styleDict[num]=style#AddblankstyleentriesforundefinedstylesnewStyles=[]styleItems=styleIdNames.items()+setti...
31,501
def setSTCStyles(stc, styles, styleIdNames, commonDefs, lang, lexer, keywords): #wxLogMessage('Set style') styleDict = {} styleNumIdxMap = {} # build style dict based on given styles for numStyle in styles: num, style = parsePropLine(numStyle) styleDict[num] = style # Add blank style entries for undefined styles newS...
def setSTCStyles(stc, styles, styleIdNames, commonDefs, lang, lexer, keywords): #wxLogMessage('Set style') styleDict = {} styleNumIdxMap = {} # build style dict based on given styles for numStyle in styles: num, style = parsePropLine(numStyle) styleDict[num] = style # Add blank style entries for undefined styles newS...
31,502
def setSTCStyles(stc, styles, styleIdNames, commonDefs, lang, lexer, keywords): #wxLogMessage('Set style') styleDict = {} styleNumIdxMap = {} # build style dict based on given styles for numStyle in styles: num, style = parsePropLine(numStyle) styleDict[num] = style # Add blank style entries for undefined styles newS...
defsetSTCStyles(stc,styles,styleIdNames,commonDefs,lang,lexer,keywords):#wxLogMessage('Setstyle')styleDict={}styleNumIdxMap={}#buildstyledictbasedongivenstylesfornumStyleinstyles:num,style=parsePropLine(numStyle)styleDict[num]=style#AddblankstyleentriesforundefinedstylesnewStyles=[]styleItems=styleIdNames.items()+setti...
31,503
def setSTCStyles(stc, styles, styleIdNames, commonDefs, lang, lexer, keywords): #wxLogMessage('Set style') styleDict = {} styleNumIdxMap = {} # build style dict based on given styles for numStyle in styles: num, style = parsePropLine(numStyle) styleDict[num] = style # Add blank style entries for undefined styles newS...
def setSTCStyles(stc, styles, styleIdNames, commonDefs, lang, lexer, keywords): #wxLogMessage('Set style') styleDict = {} styleNumIdxMap = {} # build style dict based on given styles for numStyle in styles: num, style = parsePropLine(numStyle) styleDict[num] = style # Add blank style entries for undefined styles newS...
31,504
def readPyValFromConfig(conf, name): return eval(string.replace(conf.Read(name), '\r\n', '\n')+'\n')
def readPyValFromConfig(conf, name): ns = {} ns.update(wxPython.stc.__dict__) ns['wx'] = wx value = conf.Read(name).replace('\r\n', '\n')+'\n' try: return eval(value, ns) except: print value raise
31,505
def initFromConfig(configFile, lang): cfg = wxFileConfig(localFilename=configFile, style=wxCONFIG_USE_LOCAL_FILE) cfg.SetExpandEnvVars(False) # read in all group names for this language groupPrefix = 'style.%s'%lang gpLen = len(groupPrefix) predefStyleGroupNames, otherLangStyleGroupNames = [], [] cont, val, idx = cfg....
def initFromConfig(configFile, lang): if not os.path.exists(configFile): raise Exception, 'Config file %s not found'%configFile cfg = wx.FileConfig(localFilename=configFile, style= wx.CONFIG_USE_LOCAL_FILE) cfg.SetExpandEnvVars(False) # read in all group names for this language groupPrefix = 'style.%s'%lang gpLen = le...
31,506
def initFromConfig(configFile, lang): cfg = wxFileConfig(localFilename=configFile, style=wxCONFIG_USE_LOCAL_FILE) cfg.SetExpandEnvVars(False) # read in all group names for this language groupPrefix = 'style.%s'%lang gpLen = len(groupPrefix) predefStyleGroupNames, otherLangStyleGroupNames = [], [] cont, val, idx = cfg....
def initFromConfig(configFile, lang): cfg = wxFileConfig(localFilename=configFile, style=wxCONFIG_USE_LOCAL_FILE) cfg.SetExpandEnvVars(False) # read in all group names for this language groupPrefix = 'style.%s'%lang gpLen = len(groupPrefix) predefStyleGroupNames, otherLangStyleGroupNames = [], [] cont, val, idx = cfg....
31,507
def writeStylesToConfig(config, group, styles): config.SetPath('') config.DeleteGroup(group) config.SetPath(group) for style in styles: name, value = string.split(style, '=') config.Write(name, string.strip(value)) config.SetPath('')
def writeStylesToConfig(config, group, styles): config.SetPath('') config.DeleteGroup(group) config.SetPath(group) for style in styles: name, value = style.split('=') config.Write(name, value.strip()) config.SetPath('')
31,508
def initSTC(stc, config, lang): """ Main module entry point. Initialise a wxSTC from given config file.""" (cfg, commonDefs, styleIdNames, styles, predefStyleGroupNames, predefStyleGroups, otherLangStyleGroupNames, otherLangStyleGroups, displaySrc, lexer, keywords, braceInfo) = initFromConfig(config, lang) setSTCStyle...
def initSTC(stc, config, lang): """ Main module entry point. Initialise a wxSTC from given config file.""" (cfg, commonDefs, styleIdNames, styles, predefStyleGroupNames, predefStyleGroups, otherLangStyleGroupNames, otherLangStyleGroups, displaySrc, lexer, keywords, braceInfo) = initFromConfig(config, lang) setSTCStyle...
31,509
def initSTC(stc, config, lang): """ Main module entry point. Initialise a wxSTC from given config file.""" (cfg, commonDefs, styleIdNames, styles, predefStyleGroupNames, predefStyleGroups, otherLangStyleGroupNames, otherLangStyleGroups, displaySrc, lexer, keywords, braceInfo) = initFromConfig(config, lang) setSTCStyle...
def initSTC(stc, config, lang): """ Main module entry point. Initialise a wxSTC from given config file.""" (cfg, commonDefs, styleIdNames, styles, predefStyleGroupNames, predefStyleGroups, otherLangStyleGroupNames, otherLangStyleGroups, displaySrc, lexer, keywords, braceInfo) = initFromConfig(config, lang) setSTCStyle...
31,510
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()
31,511
def __init__(self,arg0) : self.this = miscc.new_wxAcceleratorTable(arg0) self.thisown = 1
def __init__(self,arg0) : self.this = miscc.new_wxAcceleratorTable(arg0) self.thisown = 1
31,512
def RedirectStdio(self, filename): if filename: sys.stdout = sys.stderr = open(filename, 'a') else: #raise self.error, 'wxPyStdOutWindow not yet implemented.' self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow()
def RedirectStdio(self, filename): if filename: sys.stdout = sys.stderr = open(filename, 'a') else: #raise self.error, 'wxPyStdOutWindow not yet implemented.' self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow()
31,513
def NameRegions(*args, **kwargs): """NameRegions(wxString parentName="")""" return _ogl.PyShape_NameRegions(*args, **kwargs)
def NameRegions(*args, **kwargs): """NameRegions(wxString parentName=wxPyEmptyString)""" return _ogl.PyShape_NameRegions(*args, **kwargs)
31,514
def onSubmakefile(type, dirname, names): bakes = [x for x in names if x.endswith('.bkl')] if len(bakes) == 0: return bakes.sort() dirname = dirname.replace(os.sep, '/') depth = dirname.count('/') - 2 if depth <= 0: return if type==SAMPLES_DIR: prefix = ''.join(['../' for i in range(0,depth)]) dirflags = '-DWXTOPDIR=%s...
def onSubmakefile(type, dirname, names): bakes = [x for x in names if x.endswith('.bkl')] if len(bakes) == 0: return bakes.sort() dirname = dirname.replace(os.sep, '/') depth = dirname.count('/') - 2 if depth <= 0: return if type==SAMPLES_DIR: prefix = ''.join(['../' for i in range(0,depth)]) topdirflags = '-DWXTOPDIR...
31,515
def onSubmakefile(type, dirname, names): bakes = [x for x in names if x.endswith('.bkl')] if len(bakes) == 0: return bakes.sort() dirname = dirname.replace(os.sep, '/') depth = dirname.count('/') - 2 if depth <= 0: return if type==SAMPLES_DIR: prefix = ''.join(['../' for i in range(0,depth)]) dirflags = '-DWXTOPDIR=%s...
def onSubmakefile(type, dirname, names): bakes = [x for x in names if x.endswith('.bkl')] if len(bakes) == 0: return bakes.sort() dirname = dirname.replace(os.sep, '/') depth = dirname.count('/') - 2 if depth <= 0: return if type==SAMPLES_DIR: prefix = ''.join(['../' for i in range(0,depth)]) dirflags = '-DWXTOPDIR=%s...
31,516
def onSubmakefile(type, dirname, names): bakes = [x for x in names if x.endswith('.bkl')] if len(bakes) == 0: return bakes.sort() dirname = dirname.replace(os.sep, '/') depth = dirname.count('/') - 2 if depth <= 0: return if type==SAMPLES_DIR: prefix = ''.join(['../' for i in range(0,depth)]) dirflags = '-DWXTOPDIR=%s...
def onSubmakefile(type, dirname, names): bakes = [x for x in names if x.endswith('.bkl')] if len(bakes) == 0: return bakes.sort() dirname = dirname.replace(os.sep, '/') depth = dirname.count('/') - 2 if depth <= 0: return if type==SAMPLES_DIR: prefix = ''.join(['../' for i in range(0,depth)]) dirflags = '-DWXTOPDIR=%s...
31,517
def __init__(self, *args, **kwargs): """__init__(self, PyShapeCanvas can=None) -> PyShape""" newobj = _ogl.new_PyShape(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown self._setOORandCallbackInfo(PyShapeEvtHandler)
def __init__(self, *args, **kwargs): """__init__(self, PyShapeCanvas can=None) -> PyShape""" newobj = _ogl.new_PyShape(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown self._setOORandCallbackInfo(PyShapeEvtHandler)
31,518
def DrawLines(*args, **kwargs): """DrawLines(self, int PCOUNT, Point points)""" return _ogl.PseudoMetaFile_DrawLines(*args, **kwargs)
def DrawLines(*args, **kwargs): """DrawLines(self, int points, Point points_array)""" return _ogl.PseudoMetaFile_DrawLines(*args, **kwargs)
31,519
def DrawPolygon(*args, **kwargs): """DrawPolygon(self, int PCOUNT, Point points, int flags=0)""" return _ogl.PseudoMetaFile_DrawPolygon(*args, **kwargs)
def DrawPolygon(*args, **kwargs): """DrawPolygon(self, int points, Point points_array, int flags=0)""" return _ogl.PseudoMetaFile_DrawPolygon(*args, **kwargs)
31,520
def DrawSpline(*args, **kwargs): """DrawSpline(self, int PCOUNT, Point points)""" return _ogl.PseudoMetaFile_DrawSpline(*args, **kwargs)
def DrawSpline(*args, **kwargs): """DrawSpline(self, int points, Point points_array)""" return _ogl.PseudoMetaFile_DrawSpline(*args, **kwargs)
31,521
def DrawLines(*args, **kwargs): """DrawLines(self, int PCOUNT, Point points)""" return _ogl.PyDrawnShape_DrawLines(*args, **kwargs)
def DrawLines(*args, **kwargs): """DrawLines(self, int points, Point points_array)""" return _ogl.PyDrawnShape_DrawLines(*args, **kwargs)
31,522
def DrawPolygon(*args, **kwargs): """DrawPolygon(self, int PCOUNT, Point points, int flags=0)""" return _ogl.PyDrawnShape_DrawPolygon(*args, **kwargs)
def DrawPolygon(*args, **kwargs): """DrawPolygon(self, int points, Point points_array, int flags=0)""" return _ogl.PyDrawnShape_DrawPolygon(*args, **kwargs)
31,523
def DrawSpline(*args, **kwargs): """DrawSpline(self, int PCOUNT, Point points)""" return _ogl.PyDrawnShape_DrawSpline(*args, **kwargs)
def DrawSpline(*args, **kwargs): """DrawSpline(self, int points, Point points_array)""" return _ogl.PyDrawnShape_DrawSpline(*args, **kwargs)
31,524
def PaintItem(self, item, dc): """Actually paint an item."""
def PaintItem(self, item, dc): """Actually paint an item."""
31,525
def PaintItem(self, item, dc): """Actually paint an item."""
def PaintItem(self, item, dc): """Actually paint an item."""
31,526
def OnSaveOrSaveAs(self, evt): if evt.GetId() == wxID_SAVEAS or not self.dataFile: if self.dataFile: defaultName = '' else: defaultName = 'UNTITLED.xrc' dirname = os.path.dirname(self.dataFile) dlg = wxFileDialog(self, 'Save As', dirname, defaultName, '*.xrc', wxSAVE | wxOVERWRITE_PROMPT | wxCHANGE_DIR) if dlg.ShowModa...
def OnSaveOrSaveAs(self, evt): if evt.GetId() == wxID_SAVEAS or not self.dataFile: if self.dataFile: defaultName = '' else: defaultName = 'UNTITLED.xrc' dirname = os.path.abspath(os.path.dirname(self.dataFile)) dlg = wxFileDialog(self, 'Save As', dirname, defaultName, '*.xrc', wxSAVE | wxOVERWRITE_PROMPT | wxCHANGE_DIR...
31,527
def OnPaste(self, evt): selected = tree.selection if not selected: return # key pressed event # For pasting with Ctrl pressed appendChild = True if evt.GetId() == pullDownMenu.ID_PASTE_SIBLING: appendChild = False elif evt.GetId() == self.ID_TOOL_PASTE: if g.tree.ctrl: appendChild = False else: appendChild = no...
def OnPaste(self, evt): selected = tree.selection if not selected: return # key pressed event # For pasting with Ctrl pressed appendChild = True if evt.GetId() == pullDownMenu.ID_PASTE_SIBLING: appendChild = False elif evt.GetId() == self.ID_TOOL_PASTE: if g.tree.ctrl: appendChild = False else: appendChild = no...
31,528
def __init__( self, parent, log ):
def __init__( self, parent, log ):
31,529
def __init__( self, parent, log ):
def __init__( self, parent, log ):
31,530
def __init__( self, parent, log ):
def __init__( self, parent, log ):
31,531
def __init__( self, parent, log ):
def __init__( self, parent, log ):
31,532
def __init__(self, parent, id, pos, size, style): wxTreeCtrl.__init__(self, parent, id, pos, size, style)
def __init__(self, parent, id, pos, size, style, log): wxTreeCtrl.__init__(self, parent, id, pos, size, style)
31,533
def __init__(self, parent, id, pos, size, style): wxTreeCtrl.__init__(self, parent, id, pos, size, style)
defself.log = log __init__(self,self.log = log parent,self.log = log id,self.log = log pos,self.log = log size,self.log = log style):self.log = log wxTreeCtrl.__init__(self,self.log = log parent,self.log = log id,self.log = log pos,self.log = log size,self.log = log style)
31,534
def __init__(self, parent, log): # Use the WANTS_CHARS style so the panel doesn't eat the Return key. wxPanel.__init__(self, parent, -1, style=wxWANTS_CHARS) EVT_SIZE(self, self.OnSize)
def __init__(self, parent, log): # Use the WANTS_CHARS style so the panel doesn't eat the Return key. wxPanel.__init__(self, parent, -1, style=wxWANTS_CHARS) EVT_SIZE(self, self.OnSize)
31,535
def RestoreStdio(self): sys.stdout, sys.stderr = self.saveStdio if self.stdioWin != None: self.stdioWin.Show(false) self.stdioWin.Destroy() self.stdioWin = None
def RestoreStdio(self): sys.stdout, sys.stderr = self.saveStdio if self.stdioWin != None: self.stdioWin.Show(false) self.stdioWin.Destroy() self.stdioWin ...
31,536
def __init__(self, parent, id, position=wxDefaultPosition, size=wxDefaultSize, style=0): wxScrolledWindow.__init__(self, parent, id, position, size, style)
def __init__(self, parent, id, position=wxDefaultPosition, size=wxDefaultSize, style=0): wxScrolledWindow.__init__(self, parent, id, position, size, style)
31,537
def draw(self, dc, printerScale, coord= None): colour = self.attributes['colour'] width = self.attributes['width'] * printerScale style= self.attributes['style'] pen = wx.Pen(wx.NamedColour(colour), width, style) pen.SetCap(wx.CAP_BUTT) dc.SetPen(pen) if coord == None: dc.DrawLines(self.scaled) else: dc.DrawLines(coord...
def draw(self, dc, printerScale, coord= None): colour = self.attributes['colour'] width = self.attributes['width'] * printerScale style= self.attributes['style'] if not isinstance(colour, wx.Colour): colour = wx.NamedColour(colour) pen = wx.Pen(colour, width, style) pen.SetCap(wx.CAP_BUTT) dc.SetPen(pen) if coord == No...
31,538
def draw(self, dc, printerScale, coord= None): colour = self.attributes['colour'] width = self.attributes['width'] * printerScale size = self.attributes['size'] * printerScale fillcolour = self.attributes['fillcolour'] fillstyle = self.attributes['fillstyle'] marker = self.attributes['marker']
def draw(self, dc, printerScale, coord= None): colour = self.attributes['colour'] width = self.attributes['width'] * printerScale size = self.attributes['size'] * printerScale fillcolour = self.attributes['fillcolour'] fillstyle = self.attributes['fillstyle'] marker = self.attributes['marker']
31,539
def draw(self, dc, printerScale, coord= None): colour = self.attributes['colour'] width = self.attributes['width'] * printerScale size = self.attributes['size'] * printerScale fillcolour = self.attributes['fillcolour'] fillstyle = self.attributes['fillstyle'] marker = self.attributes['marker']
def draw(self, dc, printerScale, coord= None): colour = self.attributes['colour'] width = self.attributes['width'] * printerScale size = self.attributes['size'] * printerScale fillcolour = self.attributes['fillcolour'] fillstyle = self.attributes['fillstyle'] marker = self.attributes['marker']
31,540
def _drawAxes(self, dc, p1, p2, scale, shift, xticks, yticks): penWidth= self.printerScale # increases thickness for printing only dc.SetPen(wx.Pen(wx.NamedColour('BLACK'), penWidth)) # set length of tick marks--long ones make grid if self._gridEnabled: x,y,width,height= self._point2ClientCoord(p1,p2) if self....
def _drawAxes(self, dc, p1, p2, scale, shift, xticks, yticks): penWidth= self.printerScale # increases thickness for printing only dc.SetPen(wx.Pen(self._gridColour, penWidth)) # set length of tick marks--long ones make grid if self._gridEnabled: x,y,width,height= self._point2ClientCoord(p1,p2) if self._gridEn...
31,541
def DoDrawing(self, dc): dc.BeginDrawing() dc.SetPen(wxPen(wxNamedColour('RED'))) dc.DrawRectangle(5, 5, 50, 50)
def DoDrawing(self, dc): dc.BeginDrawing() dc.SetPen(wxPen(wxNamedColour('RED'))) dc.DrawRectangle(5, 5, 50, 50)
31,542
def DoDrawing(self, dc): dc.BeginDrawing() dc.SetPen(wxPen(wxNamedColour('RED'))) dc.DrawRectangle(5, 5, 50, 50)
defDoDrawing(self,dc):dc.BeginDrawing()dc.SetPen(wxPen(wxNamedColour('RED')))dc.DrawRectangle(5,5,50,50)
31,543
def test(): testText =
def test(): testText =
31,544
def __init__(self, parent, label): wx.Panel.__init__(self, parent)
def __init__(self, parent, label): wx.Panel.__init__(self, parent)
31,545
def __init__(self, parent, label): wx.Panel.__init__(self, parent)
def __init__(self, parent, label): wx.Panel.__init__(self, parent)
31,546
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
31,547
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
31,548
def __init__(self, parent): wxPanel.__init__(self, parent, -1) print parent
def __init__(self, parent): wx.Panel.__init__(self, parent, -1) print parent
31,549
def __init__(self, parent): wxPanel.__init__(self, parent, -1) print parent
def __init__(self, parent): wxPanel.__init__(self, parent, -1) print parent
31,550
def __init__(self, parent): wxPanel.__init__(self, parent, -1) print parent
def __init__(self, parent): wxPanel.__init__(self, parent, -1) print parent
31,551
def __init__(self, parent): wxPanel.__init__(self, parent, -1) print parent
def __init__(self, parent): wxPanel.__init__(self, parent, -1) print parent
31,552
def __init__(self, parent): wxPanel.__init__(self, parent, -1) print parent
def __init__(self, parent): wxPanel.__init__(self, parent, -1) print parent
31,553
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
31,554
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
31,555
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
31,556
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
31,557
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
31,558
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
31,559
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
31,560
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
31,561
def runTest(frame, nb, log): if wx.Platform == '__WXMSW__': win = TestPanel(nb, log, frame) return win else: dlg = wx.MessageDialog(frame, 'This demo only works on MSW.', 'Sorry', wx.OK | wx.ICON_INFORMATION) dlg.ShowModal() dlg.Destroy()
def runTest(frame, nb, log): if wx.Platform == '__WXMSW__': win = TestPanel(nb, log, frame) return win else: dlg = wx.MessageDialog(frame, 'This demo only works on Windows.', 'Sorry', wx.OK | wx.ICON_INFORMATION) dlg.ShowModal() dlg.Destroy()
31,562
def HandleWxpTag(self, tag): # create a new context object self.ctx = _Context()
def HandleWxpTag(self, tag): # create a new context object self.ctx = _Context()
31,563
def import_hook(name, globals=None, locals=None, fromlist=None): # Fast path: see if the module has already been imported. try: return builtin_import(name, globals, locals, fromlist) except: print "Check imports is: " + `check_imports` if name.startswith("wxaddons"): print "Querying %s for module." % domain try: modnam...
def import_hook(name, globals=None, locals=None, fromlist=None): # Fast path: see if the module has already been imported. try: return builtin_import(name, globals, locals, fromlist) except: if name.startswith("wxaddons"): print "Querying %s for module." % domain try: modname = name.split(".")[1] comp = None comp_xml =...
31,564
def _AdjustField(self, slice): """ 'Fixes' an integer field. Right or left-justifies, as required."""
def _AdjustField(self, slice): """ 'Fixes' an integer field. Right or left-justifies, as required."""
31,565
def _OnTextChange(self, event): """ Handler for EVT_TEXT event. self._Change() is provided for subclasses, and may return False to skip this method logic. This function returns True if the event detected was a legitimate event, or False if it was a "bogus" EVT_TEXT event. (NOTE: There is currently an issue with calli...
def _OnTextChange(self, event): """ Handler for EVT_TEXT event. self._Change() is provided for subclasses, and may return False to skip this method logic. This function returns True if the event detected was a legitimate event, or False if it was a "bogus" EVT_TEXT event. (NOTE: There is currently an issue with cal...
31,566
def _OnTextChange(self, event): """ Handler for EVT_TEXT event. self._Change() is provided for subclasses, and may return False to skip this method logic. This function returns True if the event detected was a legitimate event, or False if it was a "bogus" EVT_TEXT event. (NOTE: There is currently an issue with calli...
def _OnTextChange(self, event): """ Handler for EVT_TEXT event. self._Change() is provided for subclasses, and may return False to skip this method logic. This function returns True if the event detected was a legitimate event, or False if it was a "bogus" EVT_TEXT event. (NOTE: There is currently an issue with calli...
31,567
def _OnFocus(self,event): """ This event handler is currently necessary to work around new default behavior as of wxPython2.3.3; The TAB key auto selects the entire contents of the wxTextCtrl *after* the EVT_SET_FOCUS event occurs; therefore we can't query/adjust the selection *here*, because it hasn't happened yet. S...
def _OnFocus(self,event): """ This event handler is currently necessary to work around new default behavior as of wxPython2.3.3; The TAB key auto selects the entire contents of the wx.TextCtrl *after* the EVT_SET_FOCUS event occurs; therefore we can't query/adjust the selection *here*, because it hasn't happened yet. ...
31,568
def _validateNumeric(self, candidate=None): """ Validate that the value is within the specified range (if specified.)""" if candidate is None: value = self._GetValue() else: value = candidate try: groupchar = self._fields[0]._groupChar if self._isFloat: number = float(value.replace(groupchar, '').replace(self._decimalC...
def _validateNumeric(self, candidate=None): """ Validate that the value is within the specified range (if specified.)""" if candidate is None: value = self._GetValue() else: value = candidate try: groupchar = self._fields[0]._groupChar if self._isFloat: number = float(value.replace(groupchar, '').replace(self._decimalC...
31,569
def _fixSelection(self): """ This gets called after the TAB traversal selection is made, if the focus event was due to this, but before the EVT_LEFT_* events if the focus shift was due to a mouse event.
def _fixSelection(self): """ This gets called after the TAB traversal selection is made, if the focus event was due to this, but before the EVT_LEFT_* events if the focus shift was due to a mouse event.
31,570
def _Cut(self): """ Used to override the default Cut() method in base controls, instead copying the selection to the clipboard and then blanking the selection, leaving only the mask in the selected area behind. Note: _Cut (read "undercut" ;-) must be called from a Cut() override in the derived control because the mixin...
def _Cut(self): """ Used to override the default Cut() method in base controls, instead copying the selection to the clipboard and then blanking the selection, leaving only the mask in the selected area behind. Note: _Cut (read "undercut" ;-) must be called from a Cut() override in the derived control because the mixin...
31,571
def _Cut(self): """ Used to override the default Cut() method in base controls, instead copying the selection to the clipboard and then blanking the selection, leaving only the mask in the selected area behind. Note: _Cut (read "undercut" ;-) must be called from a Cut() override in the derived control because the mixin...
def _Cut(self): """ Used to override the default Cut() method in base controls, instead copying the selection to the clipboard and then blanking the selection, leaving only the mask in the selected area behind. Note: _Cut (read "undercut" ;-) must be called from a Cut() override in the derived control because the mixin...
31,572
## def _Copy( self ):
## def _Copy( self ):
31,573
## def _Copy( self ):
## def _Copy( self ):
31,574
## def _Copy( self ):
## def _Copy( self ):
31,575
## def _Copy( self ):
## def _Copy( self ):
31,576
def _getClipboardContents( self ): """ Subroutine for getting the current contents of the clipboard. """ do = wxTextDataObject() wxTheClipboard.Open() success = wxTheClipboard.GetData(do) wxTheClipboard.Close()
def _getClipboardContents( self ): """ Subroutine for getting the current contents of the clipboard. """ do = wxTextDataObject() wxTheClipboard.Open() success = wxTheClipboard.GetData(do) wxTheClipboard.Close()
31,577
def onClickPrint(self, event): for format in masktags.keys(): sep = "+------------------------+" print "%s\n%s \n Mask: %s \n RE Validation string: %s\n" % (sep,format, masktags[format]['mask'], masktags[format]['validRegex'])
def onClickPrint(self, event): for format in masktags.keys(): sep = "+------------------------+" print "%s\n%s \n Mask: %s \n RE Validation string: %s\n" % (sep,format, masktags[format]['mask'], masktags[format]['validRegex'])
31,578
def onClickPrint(self, event): for format in masktags.keys(): sep = "+------------------------+" print "%s\n%s \n Mask: %s \n RE Validation string: %s\n" % (sep,format, masktags[format]['mask'], masktags[format]['validRegex'])
def onClickPrint(self, event): for format in masktags.keys(): sep = "+------------------------+" print "%s\n%s \n Mask: %s \n RE Validation string: %s\n" % (sep,format, masktags[format]['mask'], masktags[format]['validRegex'])
31,579
def __init__(self, parent, log): self.log = log sp.ScrolledPanel.__init__(self, parent, -1)
def __init__(self, parent, log): self.log = log sp.ScrolledPanel.__init__(self, parent, -1)
31,580
def OnTest1Timer(self, evt): self.log.write("got EVT_TIMER event\n")
def OnTest1Timer(self, evt): self.log.write("got EVT_TIMER event\n")
31,581
def OnTest2Start(self, evt): # Call OnTest2Timer one second in the future, passing some # optional arbitrary args. There is no need to hold a # reference to this one, unless we want to manipulate or query # it later like we do in the two methods below self.t2 = wx.FutureCall(1000, self.OnTest2Timer, 'a', 'b', 'c', one...
def OnTest2Start(self, evt): # Call OnTest2Timer one second in the future, passing some # optional arbitrary args. There is no need to hold a # reference to this one, unless we want to manipulate or query # it later like we do in the two methods below self.t2 = wx.CallLater(1000, self.OnTest2Timer, 'a', 'b', 'c', one=...
31,582
def OnTest2Start(self, evt): # Call OnTest2Timer one second in the future, passing some # optional arbitrary args. There is no need to hold a # reference to this one, unless we want to manipulate or query # it later like we do in the two methods below self.t2 = wx.FutureCall(1000, self.OnTest2Timer, 'a', 'b', 'c', one...
def OnTest2Start(self, evt): # Call OnTest2Timer one second in the future, passing some # optional arbitrary args. There is no need to hold a # reference to this one, unless we want to manipulate or query # it later like we do in the two methods below self.t2 = wx.FutureCall(1000, self.OnTest2Timer, 'a', 'b', 'c', one...
31,583
def OnTest2Stop(self, evt): self.t2.Stop() self.log.write("FutureCall stopped, last return value was: %s\n" % repr(self.t2.GetResult())) del self.t2 self.t2b2.Disable()
def OnTest2Stop(self, evt): self.t2.Stop() self.log.write("CallLater stopped, last return value was: %s\n" % repr(self.t2.GetResult())) del self.t2 self.t2b2.Disable()
31,584
def OnTest2Timer(self, *args, **kw): self.log.write("FutureCall called with args=%s, kwargs=%s\n" % (args, kw))
def OnTest2Timer(self, *args, **kw): self.log.write("FutureCall called with args=%s, kwargs=%s\n" % (args, kw))
31,585
def InitGL( self ): glMatrixMode(GL_PROJECTION) # camera frustrum setup glFrustum(-0.5, 0.5, -0.5, 0.5, 1.0, 3.0) glMaterial(GL_FRONT, GL_AMBIENT, [0.2, 0.2, 0.2, 1.0]) glMaterial(GL_FRONT, GL_DIFFUSE, [0.8, 0.8, 0.8, 1.0]) glMaterial(GL_FRONT, GL_SPECULAR, [1.0, 0.0, 1.0, 1.0]) glMaterial(GL_FRONT, GL_SHININESS, 50.0)...
def InitGL( self ): glMatrixMode(GL_PROJECTION) # camera frustrum setup glFrustum(-0.5, 0.5, -0.5, 0.5, 1.0, 3.0) glMaterial(GL_FRONT, GL_AMBIENT, [0.2, 0.2, 0.2, 1.0]) glMaterial(GL_FRONT, GL_DIFFUSE, [0.8, 0.8, 0.8, 1.0]) glMaterial(GL_FRONT, GL_SPECULAR, [1.0, 0.0, 1.0, 1.0]) glMaterial(GL_FRONT, GL_SHININESS, 50.0)...
31,586
def InitGL( self ): glMatrixMode(GL_PROJECTION) # camera frustrum setup glFrustum(-0.5, 0.5, -0.5, 0.5, 1.0, 3.0) glMaterial(GL_FRONT, GL_AMBIENT, [0.2, 0.2, 0.2, 1.0]) glMaterial(GL_FRONT, GL_DIFFUSE, [0.8, 0.8, 0.8, 1.0]) glMaterial(GL_FRONT, GL_SPECULAR, [1.0, 0.0, 1.0, 1.0]) glMaterial(GL_FRONT, GL_SHININESS, 50.0)...
def glutInit([]) InitGL( glutInit([]) self glutInit([]) ): glutInit([]) glMatrixMode(GL_PROJECTION) glutInit([]) # glutInit([]) camera glutInit([]) frustrum glutInit([]) setup glutInit([]) glFrustum(-0.5, glutInit([]) 0.5, glutInit([]) -0.5, glutInit([]) 0.5, glutInit([]) 1.0, glutInit([]) 3.0) glutInit([]) glMaterial(...
31,587
def __init__(self, parent, log): wx.Panel.__init__(self, parent, -1)
def __init__(self, parent, log): wx.Panel.__init__(self, parent, -1)
31,588
def __init__(self, parent, log): wx.Panel.__init__(self, parent, -1)
def __init__(self, parent, log): wx.Panel.__init__(self, parent, -1)
31,589
def OnSashDrag(self, event): if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE: return
def OnSashDrag(self, event): if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE: return
31,590
def OnSashDrag(self, event): if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE: return
def OnSashDrag(self, event): if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE: return
31,591
def OnSashDrag(self, event): if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE: return
def OnSashDrag(self, event): if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE: return
31,592
def OnSashDrag(self, event): if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE: return
def OnSashDrag(self, event): if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE: return
31,593
def OnSashDrag(self, event): if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE: return
def OnSashDrag(self, event): if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE: return
31,594
def OnRunDynamicWizard(self, evt): # Create the wizard and the pages #wizard = wx.PreWizard() #wizard.SetExtraStyle(wx.WIZARD_EX_HELPBUTTON) #wizard.Create(self, self.ID_wiz, "Simple Wizard", # images.getWizTest1Bitmap()) wizard = wiz.Wizard(self, -1, "Simple Wizard", images.getWizTest1Bitmap())
def OnRunDynamicWizard(self, evt): # Create the wizard and the pages #wizard = wx.PreWizard() #wizard.SetExtraStyle(wx.WIZARD_EX_HELPBUTTON) #wizard.Create(self, self.ID_wiz, "Simple Wizard", # images.getWizTest1Bitmap()) wizard = wiz.Wizard(self, -1, "Simple Wizard", images.getWizTest1Bitmap())
31,595
def adjustLFLAGS(lfags, libdirs, libs): '''Extract the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
def adjustLFLAGS(lflags, libdirs, libs): '''Extract the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
31,596
def __init__(self, parent): wxPanel.__init__(self, parent, -1) self.SetAutoLayout(true) VSPACE = 10
def __init__(self, parent): wxPanel.__init__(self, parent, -1) self.SetAutoLayout(true) VSPACE = 10
31,597
def __init__(self, parent): wxPanel.__init__(self, parent, -1) self.SetAutoLayout(true) VSPACE = 10
def __init__(self, parent): wxPanel.__init__(self, parent, -1) self.SetAutoLayout(true) VSPACE = 10
31,598
def OnPaint(self, event): dc = wx.PaintDC(self) dc.SetFont(self.GetFont()) dc.Clear() text = self.GetValue() textwidth, textheight = dc.GetTextExtent(text) dcwidth, dcheight = self.GetClientSize()
def OnPaint(self, event): dc = wx.PaintDC(self) dc.SetFont(self.GetFont()) dc.Clear() text = self.GetValue() textwidth, textheight = dc.GetTextExtent(text) dcwidth, dcheight = self.GetClientSize()
31,599