rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
new_select_to = min(edit_end, len(newvalue.rstrip())) | new_select_to = min(edit_end, len(newtext.rstrip())) | def _insertKey(self, char, pos, sel_start, sel_to, value, allowAutoSelect=False): """ Handles replacement of the character at the current insertion point.""" | 0297af15208b916f05dc939e2c7679639a42ecd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/0297af15208b916f05dc939e2c7679639a42ecd3/maskededit.py |
if self.callCallback: | if self.callCallback and self.changeCallback: | def OnChanged(self, evt): if self.callCallback: self.changeCallback(evt) | c1e820a40eed983ceb9e17a3d387dea707e31525 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/c1e820a40eed983ceb9e17a3d387dea707e31525/filebrowsebutton.py |
self.SetValue (dlg.GetPath()) | self.SetValue(dlg.GetPath()) | def OnBrowse (self, event = None): """ Going to browse for file... """ current = self.GetValue() directory = os.path.split(current) if os.path.isdir( current): directory = current current = '' elif directory and os.path.isdir( directory[0] ): current = directory[1] directory = directory [0] else: directory = self.start... | c1e820a40eed983ceb9e17a3d387dea707e31525 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/c1e820a40eed983ceb9e17a3d387dea707e31525/filebrowsebutton.py |
def OnBrowse (self, event = None): """ Going to browse for file... """ current = self.GetValue() directory = os.path.split(current) if os.path.isdir( current): directory = current current = '' elif directory and os.path.isdir( directory[0] ): current = directory[1] directory = directory [0] else: directory = self.start... | c1e820a40eed983ceb9e17a3d387dea707e31525 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/c1e820a40eed983ceb9e17a3d387dea707e31525/filebrowsebutton.py | ||
return self.textControl.GetValue () | return self.textControl.GetValue() | def GetValue (self): """ Convenient access to text control value """ return self.textControl.GetValue () | c1e820a40eed983ceb9e17a3d387dea707e31525 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/c1e820a40eed983ceb9e17a3d387dea707e31525/filebrowsebutton.py |
This demo shows Drand and Drop using a custom data type and a custom data object. A type called "DoodleLines" is created and a Python Pickle of a list is actually transfered in the drag and drop opperation. | This demo shows Drag and Drop using a custom data type and a custom data object. A type called "DoodleLines" is created and a Python Pickle of a list is actually transfered in the drag and drop opperation. | def runTest(frame, nb, log): win = TestPanel(nb, log) return win | dafb483b3a1f273e79bae8cbc7eb0bab2387239b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/dafb483b3a1f273e79bae8cbc7eb0bab2387239b/CustomDragAndDrop.py |
wxART_TOOLBAR = misc2c.wxART_TOOLBAR wxART_MENU = misc2c.wxART_MENU wxART_FRAME_ICON = misc2c.wxART_FRAME_ICON wxART_CMN_DIALOG = misc2c.wxART_CMN_DIALOG wxART_HELP_BROWSER = misc2c.wxART_HELP_BROWSER wxART_MESSAGE_BOX = misc2c.wxART_MESSAGE_BOX wxART_OTHER = misc2c.wxART_OTHER wxART_ADD_BOOKMARK = misc2c.wxART_ADD_BOO... | def wxArtProvider_GetIcon(*_args, **_kwargs): val = apply(misc2c.wxArtProvider_GetIcon,_args,_kwargs) if val: val = wxIconPtr(val); val.thisown = 1 return val | eb67b7039dc8d6e13d4edc708de667abf66cee25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/eb67b7039dc8d6e13d4edc708de667abf66cee25/misc2.py | |
self, parent, id=-1, | self, parent, id=-1, value = 0, | def __init__ ( self, parent, id=-1, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, validator = wxDefaultValidator, name = "integer", value = 0, min=None, max=None, limited = 0, allow_none = 0, allow_long = 0, default_color = wxBLACK, oob_color = wxRED, ): | 44934d2cf677153116ef59dac3907fe7ee5622db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/44934d2cf677153116ef59dac3907fe7ee5622db/intctrl.py |
value = 0, min=None, max=None, | min=None, max=None, | def __init__ ( self, parent, id=-1, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, validator = wxDefaultValidator, name = "integer", value = 0, min=None, max=None, limited = 0, allow_none = 0, allow_long = 0, default_color = wxBLACK, oob_color = wxRED, ): | 44934d2cf677153116ef59dac3907fe7ee5622db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/44934d2cf677153116ef59dac3907fe7ee5622db/intctrl.py |
if dy == 0 or dx == 0: return False | if dy == 0 and dx == 0: continue | def HitTest(self, x, y): if not self._lineControlPoints: return False | 58c132bbfcbbed7ca67ed6c2c278306b885bee48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/58c132bbfcbbed7ca67ed6c2c278306b885bee48/_lines.py |
if len(self._lineControlPoints) > 2: self.Initialise() | def OnMoveLink(self, dc, moveControlPoints = True): """Called when a connected object has moved, to move the link to correct position """ if not self._from or not self._to: return | 58c132bbfcbbed7ca67ed6c2c278306b885bee48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/58c132bbfcbbed7ca67ed6c2c278306b885bee48/_lines.py | |
if len(self._lineControlPoints) > 2: | if len(self._lineControlPoints) > 2 and self._initialised: | def FindLineEndPoints(self): """Finds the x, y points at the two ends of the line. | 58c132bbfcbbed7ca67ed6c2c278306b885bee48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/58c132bbfcbbed7ca67ed6c2c278306b885bee48/_lines.py |
def OnDraw(self, dc): if not self._lineControlPoints: return | 58c132bbfcbbed7ca67ed6c2c278306b885bee48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/58c132bbfcbbed7ca67ed6c2c278306b885bee48/_lines.py | ||
if self._canvas and self._lineControlPoints: | if self._canvas and self._lineControlPoints and self._controlPoints: | def ResetControlPoints(self): if self._canvas and self._lineControlPoints: for i in range(min(len(self._controlPoints), len(self._lineControlPoints))): point = self._lineControlPoints[i] control = self._controlPoints[i] control.SetX(point[0]) control.SetY(point[1]) | 58c132bbfcbbed7ca67ed6c2c278306b885bee48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/58c132bbfcbbed7ca67ed6c2c278306b885bee48/_lines.py |
pt._point = x, y | pt._point[0] = x pt._point[1] = y | def OnSizingDragLeft(self, pt, draw, x, y, keys = 0, attachment = 0): dc = wx.ClientDC(self.GetCanvas()) self.GetCanvas().PrepareDC(dc) | 58c132bbfcbbed7ca67ed6c2c278306b885bee48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/58c132bbfcbbed7ca67ed6c2c278306b885bee48/_lines.py |
pt._point = x, y | pt._point[0] = x pt._point[1] = y | def OnSizingBeginDragLeft(self, pt, x, y, keys = 0, attachment = 0): dc = wx.ClientDC(self.GetCanvas()) self.GetCanvas().PrepareDC(dc) | 58c132bbfcbbed7ca67ed6c2c278306b885bee48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/58c132bbfcbbed7ca67ed6c2c278306b885bee48/_lines.py |
pt._point = pt._originalPos[0], pt._originalPos[1] | pt._point[0] = pt._originalPos[0] pt._point[1] = pt._originalPos[1] | def OnSizingEndDragLeft(self, pt, x, y, keys = 0, attachment = 0): dc = wx.ClientDC(self.GetCanvas()) self.GetCanvas().PrepareDC(dc) | 58c132bbfcbbed7ca67ed6c2c278306b885bee48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/58c132bbfcbbed7ca67ed6c2c278306b885bee48/_lines.py |
if self.GetFrom(): self.GetFrom().MoveLineToNewAttachment(dc, self, x, y) | if self.GetFrom(): self.GetFrom().MoveLineToNewAttachment(dc, self, x, y) | def OnSizingEndDragLeft(self, pt, x, y, keys = 0, attachment = 0): dc = wx.ClientDC(self.GetCanvas()) self.GetCanvas().PrepareDC(dc) | 58c132bbfcbbed7ca67ed6c2c278306b885bee48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/58c132bbfcbbed7ca67ed6c2c278306b885bee48/_lines.py |
if self.GetTo(): self.GetTo().MoveLineToNewAttachment(dc, self, x, y) | if self.GetTo(): self.GetTo().MoveLineToNewAttachment(dc, self, x, y) | def OnSizingEndDragLeft(self, pt, x, y, keys = 0, attachment = 0): dc = wx.ClientDC(self.GetCanvas()) self.GetCanvas().PrepareDC(dc) | 58c132bbfcbbed7ca67ed6c2c278306b885bee48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/58c132bbfcbbed7ca67ed6c2c278306b885bee48/_lines.py |
lpt._point = pt[0], pt[1] | lpt._point[0] = pt[0] lpt._point[1] = pt[1] | def OnMoveMiddleControlPoint(self, dc, lpt, pt): lpt._xpos = pt[0] lpt._ypos = pt[1] | 58c132bbfcbbed7ca67ed6c2c278306b885bee48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/58c132bbfcbbed7ca67ed6c2c278306b885bee48/_lines.py |
""" | ''' | def debug(msg): if DEBUG: print msg | ab249a4dcb4a7b2a55f1cf0021c79976bf874b02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/ab249a4dcb4a7b2a55f1cf0021c79976bf874b02/vtk.py |
""" | ''' | def debug(msg): if DEBUG: print msg | ab249a4dcb4a7b2a55f1cf0021c79976bf874b02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/ab249a4dcb4a7b2a55f1cf0021c79976bf874b02/vtk.py |
class DemoCodeViewer(PythonSTC): def __init__(self, parent, ID): PythonSTC.__init__(self, parent, ID, wx.BORDER_NONE) | class DemoCodeEditor(PythonSTC): def __init__(self, parent): PythonSTC.__init__(self, parent, -1, wx.BORDER_NONE) | def GetTip(self): return "This is my tip" | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
self.SetReadOnly(False) | def SetValue(self, value): if wx.USE_UNICODE: value = value.decode('iso8859_1') self.SetReadOnly(False) self.SetText(value) self.SetReadOnly(True) | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py | |
self.SetReadOnly(True) | self.EmptyUndoBuffer() self.SetSavePoint() def IsModified(self): return self.GetModify() | def SetValue(self, value): if wx.USE_UNICODE: value = value.decode('iso8859_1') self.SetReadOnly(False) self.SetText(value) self.SetReadOnly(True) | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
self.GotoPos(pos) | line = self.LineFromPosition(pos) self.EnsureVisible(line) | def ShowPosition(self, pos): self.GotoPos(pos) | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
class DemoCodeViewer(wx.TextCtrl): def __init__(self, parent, ID): wx.TextCtrl.__init__(self, parent, ID, style = wx.TE_MULTILINE | wx.TE_READONLY | | class DemoCodeEditor(wx.TextCtrl): def __init__(self, parent): wx.TextCtrl.__init__(self, parent, -1, style = wx.TE_MULTILINE | | def SetUpEditor(self): """ This method carries out the work of setting up the demo editor. It's seperate so as not to clutter up the init code. """ import keyword self.SetLexer(stc.STC_LEX_PYTHON) self.SetKeyWords(0, " ".join(keyword.kwlist)) | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
return apply(os.path.join, tuple(path.split('/'))) | str = apply(os.path.join, tuple(path.split('/'))) if path.startswith('/'): str = '/' + str return str def GetModifiedDirectory(): """ Returns the directory where modified versions of the demo files are stored """ return opj(wx.GetHomeDir() + "/.wxPyDemo/modified/") def GetModifiedFilename(name): """ Returns the fi... | def opj(path): """Convert paths to the platform-specific separator""" return apply(os.path.join, tuple(path.split('/'))) | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, -1, title, size = (800, 600), style=wx.DEFAULT_FRAME_STYLE|wx.NO_FULL_REPAINT_ON_RESIZE) | def __init__(self, parent, title): wx.Frame.__init__(self, parent, -1, title, size = (950, 750), style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE) self.loaded = False | def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, -1, title, size = (800, 600), style=wx.DEFAULT_FRAME_STYLE|wx.NO_FULL_REPAINT_ON_RESIZE) | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
self.window = None | self.demoPage = None self.codePage = None self.useModified = False | def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, -1, title, size = (800, 600), style=wx.DEFAULT_FRAME_STYLE|wx.NO_FULL_REPAINT_ON_RESIZE) | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
dim = 16 | dim = 16 | def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, -1, title, size = (800, 600), style=wx.DEFAULT_FRAME_STYLE|wx.NO_FULL_REPAINT_ON_RESIZE) | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
self.log = wx.TextCtrl(splitter2, -1, style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL) wx.Log_SetActiveTarget(MyLog(self.log)) | def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, -1, title, size = (800, 600), style=wx.DEFAULT_FRAME_STYLE|wx.NO_FULL_REPAINT_ON_RESIZE) | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py | |
def EmptyHandler(evt): pass | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py | ||
def EmptyHandler(evt): pass | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py | ||
self.nb = wx.Notebook(splitter2, -1, style=wx.CLIP_CHILDREN) | def EmptyHandler(evt): pass | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py | |
def OnOvrSize(evt, ovr=self.ovr): ovr.SetSize(evt.GetSize()) | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py | ||
self.SetOverview(self.overviewText, overview) self.txt = DemoCodeViewer(self.nb, -1) self.nb.AddPage(self.txt, "Demo Code") self.LoadDemoSource('Main.py') | if "gtk2" in wx.PlatformInfo: self.ovr.NormalizeFontSizes() self.SetOverview(self.overviewText, mainOverview) self.log = wx.TextCtrl(splitter2, -1, style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL) wx.Log_SetActiveTarget(MyLog(self.log)) | def OnOvrSize(evt, ovr=self.ovr): ovr.SetSize(evt.GetSize()) | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
splitter2.SplitHorizontally(self.nb, self.log, -120) splitter.SplitVertically(self.tree, splitter2, 180) | splitter2.SplitHorizontally(self.nb, self.log, -160) splitter.SplitVertically(self.tree, splitter2, 200) | def OnOvrSize(evt, ovr=self.ovr): ovr.SetSize(evt.GetSize()) | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
def OnOvrSize(evt, ovr=self.ovr): ovr.SetSize(evt.GetSize()) | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py | ||
splitter.SetSashPosition(sz.height - 120, False) | splitter.SetSashPosition(sz.height - 160, False) | def SplitterOnSize(evt): splitter = evt.GetEventObject() sz = splitter.GetSize() splitter.SetSashPosition(sz.height - 120, False) evt.Skip() | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
def SplitterOnSize(evt): splitter = evt.GetEventObject() sz = splitter.GetSize() splitter.SetSashPosition(sz.height - 120, False) evt.Skip() | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py | ||
if len(sys.argv) == 2: try: selectedDemo = self.treeMap[sys.argv[1]] except: selectedDemo = None | self.LoadDemo(self.overviewText) self.loaded = True if len(sys.argv) > 1: arg = sys.argv[1] if arg.endswith('.py'): arg = arg[:-3] selectedDemo = self.treeMap.get(arg, None) | def SplitterOnSize(evt): splitter = evt.GetEventObject() sz = splitter.GetSize() splitter.SetSashPosition(sz.height - 120, False) evt.Skip() | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
def SplitterOnSize(evt): splitter = evt.GetEventObject() sz = splitter.GetSize() splitter.SetSashPosition(sz.height - 120, False) evt.Skip() | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py | ||
def WriteText(self, text): if text[-1:] == '\n': text = text[:-1] wx.LogMessage(text) | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py | ||
if self.dying: | if self.dying or not self.loaded: | def OnSelChanged(self, event): if self.dying: return | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
self.RunDemo(itemText) def RunDemo(self, itemText): os.chdir(self.cwd) if self.nb.GetPageCount() == 3: if self.nb.GetSelection() == 2: self.nb.SetSelection(0) | self.LoadDemo(itemText) def LoadDemo(self, demoName): try: wx.BeginBusyCursor() os.chdir(self.cwd) self.ShutdownDemoModule() if demoName == self.overviewText: self.demoModules = DemoModules(__name__) self.SetOverview(self.overviewText, mainOverview) self.LoadDemoSource() self.UpdateNotebook(0) else: if os.path.e... | def OnSelChanged(self, event): if self.dying: return | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
if self.window is not None: if hasattr(self.window, "ShutdownDemo"): self.window.ShutdownDemo() wx.SafeYield() self.nb.DeletePage(2) if itemText == self.overviewText: self.LoadDemoSource('Main.py') self.SetOverview(self.overviewText, overview) self.window = None else: if os.path.exists(itemText + '.py'): wx.BeginBusy... | if hasattr(self.demoPage, "ShutdownDemo"): self.demoPage.ShutdownDemo() wx.YieldIfNeeded() self.demoPage = None def UpdateNotebook(self, select = -1): nb = self.nb debug = False def UpdatePage(page, pageText): pageExists = False pagePos = -1 for i in range(nb.GetPageCount()): if nb.GetPageText(i) == pageText: pageEx... | def RunDemo(self, itemText): os.chdir(self.cwd) if self.nb.GetPageCount() == 3: if self.nb.GetSelection() == 2: self.nb.SetSelection(0) # inform the window that it's time to quit if it cares if self.window is not None: if hasattr(self.window, "ShutdownDemo"): self.window.ShutdownDemo() wx.SafeYield() # in case the page... | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
self.ovr.SetPage("") self.txt.Clear() self.window = None self.tree.SetFocus() def LoadDemoSource(self, filename): self.txt.Clear() try: self.txt.SetValue(open(filename).read()) except IOError: self.txt.SetValue("Cannot open %s file." % filename) self.txt.SetInsertionPoint(0) self.txt.ShowPosition(0) | if debug: wx.LogMessage("DBG: STILL GONE - %s" % pageText) if select == -1: select = nb.GetSelection() UpdatePage(self.codePage, "Demo Code") UpdatePage(self.demoPage, "Demo") if select >= 0: nb.SetSelection(select) | def RunDemo(self, itemText): os.chdir(self.cwd) if self.nb.GetPageCount() == 3: if self.nb.GetSelection() == 2: self.nb.SetSelection(0) # inform the window that it's time to quit if it cares if self.window is not None: if hasattr(self.window, "ShutdownDemo"): self.window.ShutdownDemo() wx.SafeYield() # in case the page... | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
def OnToggleRedirect(self, event): app = wx.GetApp() if event.Checked(): app.RedirectStdio() print "Print statements and other standard output will now be directed to this window." else: app.RestoreStdio() print "Print statements and other standard output will now be sent to the usual location." | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py | ||
end = self.txt.GetLastPosition() textstring = self.txt.GetRange(0, end).lower() start = self.txt.GetSelection()[1] | end = editor.GetLastPosition() textstring = editor.GetRange(0, end).lower() start = editor.GetSelection()[1] | def OnFind(self, event): self.nb.SetSelection(1) end = self.txt.GetLastPosition() textstring = self.txt.GetRange(0, end).lower() start = self.txt.GetSelection()[1] findstring = self.finddata.GetFindString().lower() loc = textstring.find(findstring, start) if loc == -1 and start != 0: # string not found, start at beginn... | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
self.txt.ShowPosition(loc) self.txt.SetSelection(loc, loc + len(findstring)) | editor.ShowPosition(loc) editor.SetSelection(loc, loc + len(findstring)) | def OnFind(self, event): self.nb.SetSelection(1) end = self.txt.GetLastPosition() textstring = self.txt.GetRange(0, end).lower() start = self.txt.GetSelection()[1] findstring = self.finddata.GetFindString().lower() loc = textstring.find(findstring, start) if loc == -1 and start != 0: # string not found, start at beginn... | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
self.window = None | self.demoPage = None self.codePage = None | def OnCloseWindow(self, event): self.dying = True self.window = None self.mainmenu = None self.Destroy() | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
self.window = self.otherWin | self.demoPage = self.otherWin | def OnIdle(self, event): if self.otherWin: self.otherWin.Raise() self.window = self.otherWin self.otherWin = None | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
wx.LogMessage("OnIconfiy") | wx.LogMessage("OnIconfiy: %d" % evt.Iconized()) | def OnIconfiy(self, evt): wx.LogMessage("OnIconfiy") evt.Skip() | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
frame = wxPythonDemo(None, -1, "wxPython: (A Demonstration)") | frame = wxPythonDemo(None, "wxPython: (A Demonstration)") | def OnClose(self, evt): self.Hide() frame = wxPythonDemo(None, -1, "wxPython: (A Demonstration)") frame.Show() evt.Skip() # Make sure the default handler runs too... | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
def main(): try: demoPath = os.path.dirname(__file__) os.chdir(demoPath) except: pass app = MyApp(0) ##wx.Platform == "__WXMAC__") app.MainLoop() | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py | ||
overview = """<html><body> | mainOverview = """<html><body> | def main(): try: demoPath = os.path.dirname(__file__) os.chdir(demoPath) except: pass app = MyApp(0) ##wx.Platform == "__WXMAC__") app.MainLoop() | 08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py |
EVT_CHILD_FOCUS(self, self.OnChildFocus) | wxCallAfter(self.Scroll, 0, 0) | def __init__(self, parent, log): self.log = log wxScrolledWindow.__init__(self, parent, -1, style = wxTAB_TRAVERSAL) | 768134597142a6865e80b56fc7a473cadc18b84e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/768134597142a6865e80b56fc7a473cadc18b84e/ScrolledPanel.py |
return val def SetVerbose(self, *_args, **_kwargs): val = apply(misc2c.wxLog_SetVerbose,(self,) + _args, _kwargs) | def HasPendingMessages(self, *_args, **_kwargs): val = apply(misc2c.wxLog_HasPendingMessages,(self,) + _args, _kwargs) return val | d6eacb2570419a4ab5f9ac6aefcac61c37bc548f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/d6eacb2570419a4ab5f9ac6aefcac61c37bc548f/misc2.py | |
borderSizer = wx.BoxSizer(wx.HORIZONTAL) | def OnAddDirToProject(self, event): frame = wx.Dialog(None, -1, _("Add All Files from Directory to Project"), size= (320,200)) borderSizer = wx.BoxSizer(wx.HORIZONTAL) | bbb2889740248dad3f6405367f6382e7cb6cb839 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/bbb2889740248dad3f6405367f6382e7cb6cb839/ProjectEditor.py | |
lineSizer.Add(wx.StaticText(frame, -1, _("Directory:")), 0, wx.ALIGN_CENTER | wx.RIGHT, HALF_SPACE) dirCtrl = wx.TextCtrl(frame, -1, os.path.dirname(self.GetDocument().GetFilename()), size=(200,-1)) | dirCtrl = wx.TextCtrl(frame, -1, os.path.dirname(self.GetDocument().GetFilename()), size=(250,-1)) | def OnAddDirToProject(self, event): frame = wx.Dialog(None, -1, _("Add All Files from Directory to Project"), size= (320,200)) borderSizer = wx.BoxSizer(wx.HORIZONTAL) | bbb2889740248dad3f6405367f6382e7cb6cb839 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/bbb2889740248dad3f6405367f6382e7cb6cb839/ProjectEditor.py |
lineSizer.Add(dirCtrl, 0, wx.LEFT, HALF_SPACE) | lineSizer.Add(dirCtrl, 1, wx.ALIGN_CENTER_VERTICAL|wx.EXPAND) | def OnAddDirToProject(self, event): frame = wx.Dialog(None, -1, _("Add All Files from Directory to Project"), size= (320,200)) borderSizer = wx.BoxSizer(wx.HORIZONTAL) | bbb2889740248dad3f6405367f6382e7cb6cb839 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/bbb2889740248dad3f6405367f6382e7cb6cb839/ProjectEditor.py |
lineSizer.Add(findDirButton, 0, wx.LEFT, HALF_SPACE) contentSizer.Add(lineSizer, 0, wx.BOTTOM, SPACE) | lineSizer.Add(findDirButton, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, HALF_SPACE) flexGridSizer.Add(lineSizer, 1, wx.EXPAND) | def OnAddDirToProject(self, event): frame = wx.Dialog(None, -1, _("Add All Files from Directory to Project"), size= (320,200)) borderSizer = wx.BoxSizer(wx.HORIZONTAL) | bbb2889740248dad3f6405367f6382e7cb6cb839 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/bbb2889740248dad3f6405367f6382e7cb6cb839/ProjectEditor.py |
filterChoice = wx.Choice(frame, -1, size=(210, -1), choices=choices) | filterChoice = wx.Choice(frame, -1, size=(250, -1), choices=choices) | def OnBrowseButton(event): dlg = wx.DirDialog(frame, _("Choose a directory:"), style=wx.DD_DEFAULT_STYLE) dir = dirCtrl.GetValue() if len(dir): dlg.SetPath(dir) if dlg.ShowModal() == wx.ID_OK: dirCtrl.SetValue(dlg.GetPath()) dirCtrl.SetToolTipString(dirCtrl.GetValue()) dirCtrl.SetInsertionPointEnd() | bbb2889740248dad3f6405367f6382e7cb6cb839 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/bbb2889740248dad3f6405367f6382e7cb6cb839/ProjectEditor.py |
lineSizer = wx.BoxSizer(wx.HORIZONTAL) lineSizer.Add(wx.StaticText(frame, -1, _("Files of type:")), 0, wx.ALIGN_CENTER | wx.RIGHT, HALF_SPACE) lineSizer.Add(filterChoice, 1, wx.LEFT, HALF_SPACE) contentSizer.Add(lineSizer, 0, wx.BOTTOM|wx.EXPAND, SPACE) | flexGridSizer.Add(wx.StaticText(frame, -1, _("Files of type:")), 0, wx.ALIGN_CENTER_VERTICAL) flexGridSizer.Add(filterChoice, 1, wx.EXPAND) contentSizer.Add(flexGridSizer, 0, wx.ALL|wx.EXPAND, SPACE) | def OnBrowseButton(event): dlg = wx.DirDialog(frame, _("Choose a directory:"), style=wx.DD_DEFAULT_STYLE) dir = dirCtrl.GetValue() if len(dir): dlg.SetPath(dir) if dlg.ShowModal() == wx.ID_OK: dirCtrl.SetValue(dlg.GetPath()) dirCtrl.SetToolTipString(dirCtrl.GetValue()) dirCtrl.SetInsertionPointEnd() | bbb2889740248dad3f6405367f6382e7cb6cb839 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/bbb2889740248dad3f6405367f6382e7cb6cb839/ProjectEditor.py |
contentSizer.Add(subfolderCtrl, 0, wx.BOTTOM, SPACE) borderSizer.Add(contentSizer, 0, wx.TOP|wx.BOTTOM|wx.LEFT, SPACE) buttonSizer = wx.BoxSizer(wx.VERTICAL) | contentSizer.Add(subfolderCtrl, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, SPACE) buttonSizer = wx.BoxSizer(wx.HORIZONTAL) | def OnBrowseButton(event): dlg = wx.DirDialog(frame, _("Choose a directory:"), style=wx.DD_DEFAULT_STYLE) dir = dirCtrl.GetValue() if len(dir): dlg.SetPath(dir) if dlg.ShowModal() == wx.ID_OK: dirCtrl.SetValue(dlg.GetPath()) dirCtrl.SetToolTipString(dirCtrl.GetValue()) dirCtrl.SetInsertionPointEnd() | bbb2889740248dad3f6405367f6382e7cb6cb839 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/bbb2889740248dad3f6405367f6382e7cb6cb839/ProjectEditor.py |
buttonSizer.Add(findBtn, 0, wx.BOTTOM, HALF_SPACE) | buttonSizer.Add(findBtn, 0, wx.RIGHT, HALF_SPACE) | def OnBrowseButton(event): dlg = wx.DirDialog(frame, _("Choose a directory:"), style=wx.DD_DEFAULT_STYLE) dir = dirCtrl.GetValue() if len(dir): dlg.SetPath(dir) if dlg.ShowModal() == wx.ID_OK: dirCtrl.SetValue(dlg.GetPath()) dirCtrl.SetToolTipString(dirCtrl.GetValue()) dirCtrl.SetInsertionPointEnd() | bbb2889740248dad3f6405367f6382e7cb6cb839 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/bbb2889740248dad3f6405367f6382e7cb6cb839/ProjectEditor.py |
borderSizer.Add(buttonSizer, 0, wx.ALL, SPACE) frame.SetSizer(borderSizer) | contentSizer.Add(buttonSizer, 0, wx.ALL|wx.ALIGN_RIGHT, SPACE) frame.SetSizer(contentSizer) | def OnBrowseButton(event): dlg = wx.DirDialog(frame, _("Choose a directory:"), style=wx.DD_DEFAULT_STYLE) dir = dirCtrl.GetValue() if len(dir): dlg.SetPath(dir) if dlg.ShowModal() == wx.ID_OK: dirCtrl.SetValue(dlg.GetPath()) dirCtrl.SetToolTipString(dirCtrl.GetValue()) dirCtrl.SetInsertionPointEnd() | bbb2889740248dad3f6405367f6382e7cb6cb839 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/bbb2889740248dad3f6405367f6382e7cb6cb839/ProjectEditor.py |
(child, cookie2) = self._treeCtrl.GetNextChild(project, cookie) | (child, cookie2) = self._treeCtrl.GetNextChild(project, cookie2) | def _GetFileItem(self, shortFileName = None, longFileName = None): """ Returns the tree item for a file given the short (display) or long (fullpath) file name. """ rootItem = self._treeCtrl.GetRootItem() (project, cookie) = self._treeCtrl.GetFirstChild(rootItem) while project.IsOk(): (child, cookie2) = self._treeCtrl.... | bbb2889740248dad3f6405367f6382e7cb6cb839 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/bbb2889740248dad3f6405367f6382e7cb6cb839/ProjectEditor.py |
self.SetHandSize(h, SECOND) | self.SetHandSize(s, SECOND) | def SetHandWeights(self, h=None, m=None, s=None): if h: self.SetHandSize(h, HOUR) if m: self.SetHandSize(m, MINUTE) if s: self.SetHandSize(h, SECOND) | 99ceaa26e4b9e934a7f37d133ebcce1d0963275e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/99ceaa26e4b9e934a7f37d133ebcce1d0963275e/analogclock.py |
self.SetHandBorderColour(h, SECOND) self.SetHandFillColour(h, SECOND) | self.SetHandBorderColour(s, SECOND) self.SetHandFillColour(s, SECOND) | def SetHandColours(self, h=None, m=None, s=None): if h and not m and not s: m=h s=h if h: self.SetHandBorderColour(h, HOUR) self.SetHandFillColour(h, HOUR) if m: self.SetHandBorderColour(m, MINUTE) self.SetHandFillColour(m, MINUTE) if s: self.SetHandBorderColour(h, SECOND) self.SetHandFillColour(h, SECOND) | 99ceaa26e4b9e934a7f37d133ebcce1d0963275e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/99ceaa26e4b9e934a7f37d133ebcce1d0963275e/analogclock.py |
self.SetTickSize(h, MINUTE) | self.SetTickSize(m, MINUTE) | def SetTickSizes(self, h=None, m=None): if h: self.SetTickSize(h, HOUR) if m: self.SetTickSize(h, MINUTE) | 99ceaa26e4b9e934a7f37d133ebcce1d0963275e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/99ceaa26e4b9e934a7f37d133ebcce1d0963275e/analogclock.py |
self.SetTickFont(h, MINUTE) | self.SetTickFont(m, MINUTE) | def SetTickFontss(self, h=None, m=None): if h: self.SetTickFont(h, HOUR) if m: self.SetTickFont(h, MINUTE) | 99ceaa26e4b9e934a7f37d133ebcce1d0963275e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/99ceaa26e4b9e934a7f37d133ebcce1d0963275e/analogclock.py |
lrsizer.Add(self.mimelist, 1, wx.ALL | wx.EXPAND | wx.ALIGN_CENTER, 4) | lrsizer.Add(self.mimelist, 1, wx.ALL | wx.EXPAND | wx.ALIGN_CENTER | wx.FIXED_SIZE, 4) | def __init__(self, parent, log): self.log = log wx.Panel.__init__(self, parent, -1) | af8ea558bac3dc86899b3cb41302ccf228656321 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/af8ea558bac3dc86899b3cb41302ccf228656321/MimeTypesManager.py |
import PyCrust | from wx import py | def setUp(self): GetAttributeTestCase.setUp(self) import PyCrust spam = Spam() self.f = open('test_introspect.py') self.items = ( None, int(123), long(123), float(123), complex(123), "", unicode(""), [], (), xrange(0), {}, # Builtin function. len, # Builtin method. [].append, # User function. ham, # Byte-compiled code.... | 65136283847d6fa6cae889d9f4748d1912a37f8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/65136283847d6fa6cae889d9f4748d1912a37f8d/test_introspect.py |
PyCrust, | py, | def setUp(self): GetAttributeTestCase.setUp(self) import PyCrust spam = Spam() self.f = open('test_introspect.py') self.items = ( None, int(123), long(123), float(123), complex(123), "", unicode(""), [], (), xrange(0), {}, # Builtin function. len, # Builtin method. [].append, # User function. ham, # Byte-compiled code.... | 65136283847d6fa6cae889d9f4748d1912a37f8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/65136283847d6fa6cae889d9f4748d1912a37f8d/test_introspect.py |
def __init__(self, parent, log): gridlib.Grid.__init__(self, parent, -1) ##mixins.GridAutoEditMixin.__init__(self) self.log = log self.moveTo = None | 644f2d83909e31b14fd4a776576ebd8d79f740b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/644f2d83909e31b14fd4a776576ebd8d79f740b8/GridSimple.py | ||
def InsertLineControlPoint(self, dc = None): """Insert a control point at an arbitrary position.""" | def InsertLineControlPoint(self, dc = None, point = None): """Insert a control point at an optional given position.""" | def InsertLineControlPoint(self, dc = None): """Insert a control point at an arbitrary position.""" if dc: self.Erase(dc) | 4809f5df5d38a5d8068c7857e295a4ed22b8659c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/4809f5df5d38a5d8068c7857e295a4ed22b8659c/_lines.py |
last_point = self._lineControlPoints[-1] second_last_point = self._lineControlPoints[-2] line_x = (last_point[0] + second_last_point[0]) / 2.0 line_y = (last_point[1] + second_last_point[1]) / 2.0 | if point: line_x, line_y = point else: last_point = self._lineControlPoints[-1] second_last_point = self._lineControlPoints[-2] line_x = (last_point[0] + second_last_point[0]) / 2.0 line_y = (last_point[1] + second_last_point[1]) / 2.0 | def InsertLineControlPoint(self, dc = None): """Insert a control point at an arbitrary position.""" if dc: self.Erase(dc) | 4809f5df5d38a5d8068c7857e295a4ed22b8659c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/4809f5df5d38a5d8068c7857e295a4ed22b8659c/_lines.py |
print flags, col, self.tree.GetItemText(item, col) | self.log.write('Flags: %s, Col:%s, Text: %s' % (flags, col, self.tree.GetItemText(item, col))) | def OnRightUp(self, evt): pos = evt.GetPosition() item, flags, col = self.tree.HitTest(pos) if item: print flags, col, self.tree.GetItemText(item, col) | 00a5e5a90555ab800419265a487d325ee80bfaaa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/00a5e5a90555ab800419265a487d325ee80bfaaa/TreeListCtrl.py |
g.currentEncoding = dom.encoding | if dom.encoding: g.currentEncoding = dom.encoding | def Open(self, path): if not os.path.exists(path): wxLogError('File does not exists: %s' % path) return False # Try to read the file try: f = open(path) self.Clear() dom = minidom.parse(f) f.close() # Set encoding global variable g.currentEncoding = dom.encoding # Change dir dir = os.path.dirname(path) if dir: os.chdir... | 759c619e2808d9f6a0966662a60640083bb721b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/759c619e2808d9f6a0966662a60640083bb721b1/xrced.py |
frame.res.Load(os.path.join(basePath, 'xrced.xrc')) | try: frame.res.Load(os.path.join(basePath, 'xrced.xrc')) except wx._core.PyAssertionError: pass | def OnInit(self): global debug # Process comand-line try: opts = args = None opts, args = getopt.getopt(sys.argv[1:], 'dhiv') for o,a in opts: if o == '-h': usage() sys.exit(0) elif o == '-d': debug = True elif o == '-v': print 'XRCed version', version sys.exit(0) except getopt.GetoptError: if wxPlatform != '__WXMAC__... | 759c619e2808d9f6a0966662a60640083bb721b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/759c619e2808d9f6a0966662a60640083bb721b1/xrced.py |
cleanup = ogl.OGLCleanUp def __del__(self): self.cleanup() | def __del__(self, cleanup=ogl.OGLCleanUp): cleanup() | def runTest(frame, nb, log): # This creates some pens and brushes that the OGL library uses. # It should be called after the app object has been created, but # before OGL is used. ogl.OGLInitialize() win = TestWindow(nb, log, frame) return win | 49234978d5fc96c111ca135c6f9d8e38e7583ba2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/49234978d5fc96c111ca135c6f9d8e38e7583ba2/OGL.py |
def __init__(self, name, expr, engine): | def __call__(self, econtext): expr = super(TALESProviderExpression, self).__call__(econtext) | def __init__(self, name, expr, engine): if not '/' in expr: raise KeyError('Use `iface/key` for defining the provider.') | 491c2725976cd2b1d53ff497d575df06c4817cf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9740/491c2725976cd2b1d53ff497d575df06c4817cf6/tales.py |
raise KeyError("Do not use more then one / for defining iface/key.") | msg = "Do not use more then one '/' for defining iface/key." raise KeyError(msg) | def __init__(self, name, expr, engine): if not '/' in expr: raise KeyError('Use `iface/key` for defining the provider.') | 491c2725976cd2b1d53ff497d575df06c4817cf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9740/491c2725976cd2b1d53ff497d575df06c4817cf6/tales.py |
def __call__(self, econtext): | def __call__(self, econtext): context = econtext.vars['context'] request = econtext.vars['request'] view = econtext.vars['view'] | 491c2725976cd2b1d53ff497d575df06c4817cf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9740/491c2725976cd2b1d53ff497d575df06c4817cf6/tales.py | |
'Viewlet region interface not found.', str) | 'Provider region interface not found.', str) | def getRegion(str): """Get a region from the string. This function will create the dummy region implementation as well. """ region = zope.component.queryUtility(interfaces.IRegion, name=str) if region is None: raise interfaces.ViewletRegionLookupError( 'Viewlet region interface not found.', str) return region | c5b4fa71d367e556799299168c954ea303fd787b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9740/c5b4fa71d367e556799299168c954ea303fd787b/tales.py |
raise KeyError('Use `iface/viewletname` for defining the viewlet.') | raise KeyError('Use `iface/key` for defining the provider.') | def __init__(self, name, expr, engine): if not '/' in expr: raise KeyError('Use `iface/viewletname` for defining the viewlet.') | c5b4fa71d367e556799299168c954ea303fd787b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9740/c5b4fa71d367e556799299168c954ea303fd787b/tales.py |
cpManager = zope.component.queryMultiAdapter( (context, request, view), interfaces.IContentProviderManager) | cpManager = None res = [] iface = interfaces.IContentProviderManager objs = (context, request, view) lookup = ISiteManager(context).adapters.lookup cpManagerClass = lookup(map(providedBy, objs)+[region], iface, name='') if cpManagerClass is not None: cpManager = cpManager(context, request, view, region) | def __call__(self, econtext): context = econtext.vars['context'] request = econtext.vars['request'] view = econtext.vars['view'] | 6c76cc3f93b05797834e7547e37d564325020800 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9740/6c76cc3f93b05797834e7547e37d564325020800/tales.py |
comp = new_compiler(compiler=compiler, verbose=True, output_dir='build') | print 'Creating library', libName comp = new_compiler(compiler=compiler, verbose=True) | def buildStaticLibrary(sourceFiles, libName, libDir, compiler): '''Build libraries to be linked to simuPOP modules''' # get a c compiler comp = new_compiler(compiler=compiler, verbose=True, output_dir='build') objFiles = comp.compile(sourceFiles, include_dirs=['.']) comp.create_static_lib(objFiles, libName, libDir) | a63d7a2ef4f2e8de5d4a048c334ae57668b7edd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/a63d7a2ef4f2e8de5d4a048c334ae57668b7edd7/setup.py |
res['libraries'] = boost_lib_names | res['libraries'] = [x for x in boost_lib_names] | def ModuInfo(modu, SIMUPOP_VER='9.9.9', SIMUPOP_REV='9999'): res = {} res['src'] = ['src/simuPOP_' + modu + '_wrap.cpp'] for src in SOURCE_FILES: res['src'].append(src[:-4] + '_' + modu + '.cpp') res['src'].extend(GSL_FILES) res['libraries'] = boost_lib_names # lib if os.name == 'nt': # Windows res['libraries'].app... | 9c5f3cc221da7b23b4cf9992f7d9c0481f640def /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/9c5f3cc221da7b23b4cf9992f7d9c0481f640def/setup.py |
r.postscript(file=epsFile) r.par(mfrow=[2,1]) | def plotLD(pop, epsFile, jpgFile): ''' plot LD values in R and convert to jpg if possible ''' r.postscript(file=epsFile) r.par(mfrow=[2,1]) # return max LD res = [] # dist: distance (location) of marker # ldprime: D' value dist = [] ldprime = [] for ld in pop.dvars().ctrDSLLD: if ld[1] == pop.dvars().ctrChromDSL: dist.... | e0cab91969e23e758e89e48147a21abfafa168f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/e0cab91969e23e758e89e48147a21abfafa168f7/simuComplexDisease.py | |
r.plot( dist, ldprime, main="D' between DSL and other markers on chrom %d" % pop.dvars().ctrChrom, xlab="marker location", ylab="D'", type='b') r.abline( v = pop.locusDist(pop.dvars().ctrChromDSL), lty=3 ) r.axis( 1, [pop.locusDist(pop.dvars().ctrChromDSL)], ['DSL']) | if hasRPy: r.postscript(file=epsFile) r.par(mfrow=[2,1]) r.plot( dist, ldprime, main="D' between DSL and other markers on chrom %d" % pop.dvars().ctrChrom, xlab="marker location", ylab="D'", type='b') r.abline( v = pop.locusDist(pop.dvars().ctrChromDSL), lty=3 ) r.axis( 1, [pop.locusDist(pop.dvars().ctrChromDSL)], ['DS... | def plotLD(pop, epsFile, jpgFile): ''' plot LD values in R and convert to jpg if possible ''' r.postscript(file=epsFile) r.par(mfrow=[2,1]) # return max LD res = [] # dist: distance (location) of marker # ldprime: D' value dist = [] ldprime = [] for ld in pop.dvars().ctrDSLLD: if ld[1] == pop.dvars().ctrChromDSL: dist.... | e0cab91969e23e758e89e48147a21abfafa168f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/e0cab91969e23e758e89e48147a21abfafa168f7/simuComplexDisease.py |
r.plot( dist, ldprime, main="D' between marker %d and other markers on chrom %d" \ % (numLoci/2, pop.dvars().noDSLChrom), xlab="marker location", ylab="D'", type='b') r.abline( v = pop.locusDist(pop.chromBegin(pop.dvars().noDSLChrom)+pop.dvars().numLoci/2), lty=3 ) r.dev_off() | if hasRPy: r.plot( dist, ldprime, main="D' between marker %d and other markers on chrom %d" \ % (numLoci/2, pop.dvars().noDSLChrom), xlab="marker location", ylab="D'", type='b') r.abline( v = pop.locusDist(pop.chromBegin(pop.dvars().noDSLChrom)+pop.dvars().numLoci/2), lty=3 ) r.dev_off() | def plotLD(pop, epsFile, jpgFile): ''' plot LD values in R and convert to jpg if possible ''' r.postscript(file=epsFile) r.par(mfrow=[2,1]) # return max LD res = [] # dist: distance (location) of marker # ldprime: D' value dist = [] ldprime = [] for ld in pop.dvars().ctrDSLLD: if ld[1] == pop.dvars().ctrChromDSL: dist.... | e0cab91969e23e758e89e48147a21abfafa168f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/e0cab91969e23e758e89e48147a21abfafa168f7/simuComplexDisease.py |
def processOnePopulation(dataDir, numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, popIdx): ''' this function organize all previous fun... | e0cab91969e23e758e89e48147a21abfafa168f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/e0cab91969e23e758e89e48147a21abfafa168f7/simuComplexDisease.py | ||
summary = '''<h2><a name="pop_%d">Dataset %d</a></h2>\n''' \ % (popIdx, popIdx) summary += '''<h3>Log file (LD and other statistics): <a href="pop_%d/pop_%d.log">pop_%d.log</a></h3>\n''' \ % (popIdx, popIdx, popIdx) | summary = '''\ <h2><a name="pop_%d">Dataset %d</a></h2> <h3>Log file (LD and other statistics): <a href="pop_%d/pop_%d.log">pop_%d.log</a></h3> ''' % (popIdx, popIdx, popIdx, popIdx, popIdx) | def processOnePopulation(dataDir, numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, popIdx): ''' this function organize all previous fun... | e0cab91969e23e758e89e48147a21abfafa168f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/e0cab91969e23e758e89e48147a21abfafa168f7/simuComplexDisease.py |
if hasRPy: (suc,ldres) = plotLD(pop, epsFile, jpgFile) if suc > 0 : summary += """<p>D' measures on two chromosomes with/without DSL at the last gen: <a href="pop_%d/LD_%d.eps">LD.eps</a></p>\n""" % (popIdx, popIdx) if suc > 1 : summary += '''<img src="pop_%d/LD_%d.jpg" width=800, height=600>''' % (popIdx, popIdx) res... | (suc,ldres) = plotLD(pop, epsFile, jpgFile) if suc > 0 : summary += """<p>D' measures on two chromosomes with/without DSL at the last gen: <a href="pop_%d/LD_%d.eps">LD.eps</a></p>\n""" % (popIdx, popIdx) if suc > 1 : summary += '''<img src="pop_%d/LD_%d.jpg" width=800, height=600>''' % (popIdx, popIdx) result.extend... | def processOnePopulation(dataDir, numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, popIdx): ''' this function organize all previous fun... | e0cab91969e23e758e89e48147a21abfafa168f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/e0cab91969e23e758e89e48147a21abfafa168f7/simuComplexDisease.py |
def processOnePopulation(dataDir, numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, popIdx): ''' this function organize all previous fun... | e0cab91969e23e758e89e48147a21abfafa168f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/e0cab91969e23e758e89e48147a21abfafa168f7/simuComplexDisease.py | ||
result.append(res) | def processOnePopulation(dataDir, numChrom, numLoci, markerType, DSLafter, DSLdist, initSize, meanInitAllele, burnin, introGen, minAlleleFreq, maxAlleleFreq, fitness, mlSelModel, numSubPop, finalSize, noMigrGen, mixingGen, popSizeFunc, migrModel, mu, mi, rec, dryrun, popIdx): ''' this function organize all previous fun... | e0cab91969e23e758e89e48147a21abfafa168f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/e0cab91969e23e758e89e48147a21abfafa168f7/simuComplexDisease.py | |
if allParam[-3] != '': for i in range(len(allParam[3])): summary.write('<th>TDT%d</th>'%(i+1)) | if len(allParam[-8]) > 0: for p in allParam[-8]: summary.write('<th>%s:TDT</th>'%p) | def writeReport(content, allParam, results): ''' write a HTML file. The parts for each population has been written but we need a summary table. ''' print "Writing a report (saved in summary.htm )" try: summary = open(outputDir + "/summary.htm", 'w') except: raise exceptions.IOError("Can not open a summary file : " + ou... | e0cab91969e23e758e89e48147a21abfafa168f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/e0cab91969e23e758e89e48147a21abfafa168f7/simuComplexDisease.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.