bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger') | def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger') | 29,700 |
def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger') | def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger') | 29,701 |
def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger') | def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger') | 29,702 |
def OnStreamTimer(self, event=None, force_timer=0): if self.stream_timer: if not self.stream_timer.IsRunning(): self.stream_timer.Start(100) # One-shot mode. self.updateOutputWindow() | def OnStreamTimer(self, event=None, force_timer=0): if self.stream_timer: if not self.stream_timer.IsRunning(): self.stream_timer.Start(100) # One-shot mode. self.updateOutputWindow() | 29,703 |
## def OnUpperPageChange(self, event): | ## def OnUpperPageChange(self, event): | 29,704 |
def receiveDebuggerStatus(self, info): # Get stdout and stderr if available. errout = self.editor.erroutFrm data = info.get('stdout', None) if data: errout.appendToOutput(data) #self.appendToOutputWindow(data) data = info.get('stderr', None) if data: errout.appendToErrors(data) #self.appendToOutputWindow(data) | def receiveDebuggerStatus(self, info): # Get stdout and stderr if available. errout = self.editor.erroutFrm data = info.get('stdout', None) if data: errout.appendToOutput(data) #self.appendToOutputWindow(data) data = info.get('stderr', None) if data: errout.appendToErrors(data) #self.appendToOutputWindow(data) | 29,705 |
def ShowErrorMessage(parent, caption, mess): print mess, mess.__class__, mess.args[0] dlg = wxMessageDialog(parent, mess.__class__.__name__ +': '+mess.args[0], caption, wxOK | wxICON_EXCLAMATION) try: dlg.ShowModal() finally: dlg.Destroy() | def ShowErrorMessage(parent, caption, mess): dlg = wxMessageDialog(parent, mess.__class__.__name__ +': '+mess.args[0], caption, wxOK | wxICON_EXCLAMATION) try: dlg.ShowModal() finally: dlg.Destroy() | 29,706 |
def AddToolButtonBmpObject(frame, toolbar, thebitmap, hint, triggermeth, toggleBitmap = wxNullBitmap): nId = NewId() | def AddToolButtonBmpObject(frame, toolbar, thebitmap, hint, triggermeth, toggleBitmap = wxNullBitmap): nId = NewId() | 29,707 |
def AddToolButtonBmpObject(frame, toolbar, thebitmap, hint, triggermeth, toggleBitmap = wxNullBitmap): nId = NewId() | defreturn nId AddToolButtonBmpObject(frame,return nId toolbar,return nId thebitmap,return nId hint,return nId triggermeth,return nId toggleBitmapreturn nId =return nId wxNullBitmap):return nId nIdreturn nId =return nId NewId() | 29,708 |
def AddToolButtonBmpFile(frame, toolbar, filename, hint, triggermeth): AddToolButtonBmpObject(frame, toolbar, wxBitmap(filename, wxBITMAP_TYPE_BMP), hint, triggermeth) | def AddToolButtonBmpFile(frame, toolbar, filename, hint, triggermeth): return AddToolButtonBmpObject(frame, toolbar, wxBitmap(filename, wxBITMAP_TYPE_BMP), hint, triggermeth) | 29,709 |
def AddToolButtonBmpIS(frame, toolbar, name, hint, triggermeth, toggleBmp = ''): if toggleBmp: AddToolButtonBmpObject(frame, toolbar, IS.load(name), hint, triggermeth, IS.load(toggleBmp)) else: AddToolButtonBmpObject(frame, toolbar, IS.load(name), hint, triggermeth) | def AddToolButtonBmpIS(frame, toolbar, name, hint, triggermeth, toggleBmp = ''): if toggleBmp: return AddToolButtonBmpObject(frame, toolbar, IS.load(name), hint, triggermeth, IS.load(toggleBmp)) else: AddToolButtonBmpObject(frame, toolbar, IS.load(name), hint, triggermeth) | 29,710 |
def AddToolButtonBmpIS(frame, toolbar, name, hint, triggermeth, toggleBmp = ''): if toggleBmp: AddToolButtonBmpObject(frame, toolbar, IS.load(name), hint, triggermeth, IS.load(toggleBmp)) else: AddToolButtonBmpObject(frame, toolbar, IS.load(name), hint, triggermeth) | def AddToolButtonBmpIS(frame, toolbar, name, hint, triggermeth, toggleBmp = ''): if toggleBmp: AddToolButtonBmpObject(frame, toolbar, IS.load(name), hint, triggermeth, IS.load(toggleBmp)) else: return AddToolButtonBmpObject(frame, toolbar, IS.load(name), hint, triggermeth) | 29,711 |
def __init__(self, parent, message='Choose a file', defaultDir='.', defaultFile='', wildcard='', style=wxOPEN, pos=wxDefaultPosition): self.htmlBackCol = wxColour(192, 192, 192) self.htmlBackCol = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE) self.filterOpts = ['Boa files', 'Internal files', 'Image files', 'Al... | def __init__(self, parent, message='Choose a file', defaultDir='.', defaultFile='', wildcard='', style=wxOPEN, pos=wxDefaultPosition): self.htmlBackCol = wxColour(192, 192, 192) self.htmlBackCol = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE) self.filterOpts = ['Boa files', 'Internal files', 'Image files', 'Al... | 29,712 |
def __init__(self, parent, message='Choose a file', defaultDir='.', defaultFile='', wildcard='', style=wxOPEN, pos=wxDefaultPosition): self.htmlBackCol = wxColour(192, 192, 192) self.htmlBackCol = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE) self.filterOpts = ['Boa files', 'Internal files', 'Image files', 'Al... | def __init__(self, parent, message='Choose a file', defaultDir='.', defaultFile='', wildcard='', style=wxOPEN, pos=wxDefaultPosition): self.htmlBackCol = wxColour(192, 192, 192) self.htmlBackCol = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE) self.filterOpts = ['Boa files', 'Internal files', 'Image files', 'Al... | 29,713 |
def __init__(self, parent, message='Choose a file', defaultDir='.', defaultFile='', wildcard='', style=wxOPEN, pos=wxDefaultPosition): self.htmlBackCol = wxColour(192, 192, 192) self.htmlBackCol = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE) self.filterOpts = ['Boa files', 'Internal files', 'Image files', 'Al... | def __init__(self, parent, message='Choose a file', defaultDir='.', defaultFile='', wildcard='', style=wxOPEN, pos=wxDefaultPosition): self.htmlBackCol = wxColour(192, 192, 192) self.htmlBackCol = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE) self.filterOpts = ['Boa files', 'Internal files', 'Image files', 'Al... | 29,714 |
def Destroy(self): self.htmlBackCol = None self.lcFiles.destroy(dont_pop=self.dont_pop) wxDialog.Destroy(self) | def Destroy(self): self.htmlBackCol = None self.lcFiles.destroy() wxDialog.Destroy(self) | 29,715 |
def OnTcfilenameKeyDown(self, event): key = event.GetKeyCode() if key == WXK_TAB: names = self.lcFiles.getAllNames() partial = self.GetFilename() for name in names: if Utils.startswith(name, partial): self.lcFiles.selectItemNamed(name) self.SetFilename(name) self.tcFilename.SetSelection(len(partial), len(name)) return ... | def OnTcfilenameKeyDown(self, event): key = event.GetKeyCode() if key == WXK_TAB: names = self.lcFiles.getAllNames() partial = self.GetFilename() for name in names: if name.startswith(partial): self.lcFiles.selectItemNamed(name) self.SetFilename(name) self.tcFilename.SetSelection(len(partial), len(name)) return else: e... | 29,716 |
def buildExplorerNodes(self): transports = ExplorerNodes.RootNode('Transport', EditorHelper.imgFolder) transports.parent = transports transports.protocol = 'root' | def buildExplorerNodes(self): transports = ExplorerNodes.RootNode('Transport', EditorHelper.imgFolder) transports.parent = transports transports.protocol = 'root' | 29,717 |
def destroy(self, dont_pop=0): self.menu.Destroy() Explorer.BaseExplorerList.destroy(self, dont_pop) | def destroy(self): self.menu.Destroy() Explorer.BaseExplorerList.destroy(self, dont_pop) | 29,718 |
def destroy(self, dont_pop=0): self.menu.Destroy() Explorer.BaseExplorerList.destroy(self, dont_pop) | def destroy(self, dont_pop=0): self.menu.Destroy() Explorer.BaseExplorerList.destroy(self, dont_pop) | 29,719 |
def OnFDEndLabelEdit(self, event): newText = event.GetText() event.Skip() if newText != self.oldLabelVal:# and isinstance(self.list.node, ZopeItemNode): self.node.renameItem(self.oldLabelVal, newText) self.refreshCurrent() self.selectItemNamed(newText) self.EnsureVisible(self.selected) | def OnFDEndLabelEdit(self, event): newText = event.GetText() event.Skip() if newText != self.oldLabelVal:# and isinstance(self.list.node, ZopeItemNode): self.node.renameItem(self.oldLabelVal, newText) self.refreshCurrent() self.selectItemNamed(newText) self.EnsureVisible(self.selected) | 29,720 |
def info(self,t=None): idx=self.index(t)[0] zs =self.az[self.tinfo[idx][2]:] return self.tinfo[idx][0],self.tinfo[idx][1],zs[:find(zs,'\000')] | def info(self,t=None): idx=self.index(t)[0] zs =self.az[self.tinfo[idx][2]:] return self.tinfo[idx][0],self.tinfo[idx][1],zs[:find(zs,'\000')] | 29,721 |
def info(self,t=None): idx=self.index(t)[0] zs =self.az[self.tinfo[idx][2]:] return self.tinfo[idx][0],self.tinfo[idx][1],zs[:find(zs,'\000')] | def info(self,t=None): idx=self.index(t)[0] zs =self.az[self.tinfo[idx][2]:] return self.tinfo[idx][0],self.tinfo[idx][1],zs[:find(zs,'\000')] | 29,722 |
def info(self,t=None): idx=self.index(t)[0] zs =self.az[self.tinfo[idx][2]:] return self.tinfo[idx][0],self.tinfo[idx][1],zs[:find(zs,'\000')] | def info(self,t=None): idx=self.index(t)[0] zs =self.az[self.tinfo[idx][2]:] return self.tinfo[idx][0],self.tinfo[idx][1],zs[:find(zs,'\000')] | 29,723 |
def info(self,t=None): idx=self.index(t)[0] zs =self.az[self.tinfo[idx][2]:] return self.tinfo[idx][0],self.tinfo[idx][1],zs[:find(zs,'\000')] | def info(self,t=None): idx=self.index(t)[0] zs =self.az[self.tinfo[idx][2]:] return self.tinfo[idx][0],self.tinfo[idx][1],zs[:find(zs,'\000')] | 29,724 |
def info(self,t=None): idx=self.index(t)[0] zs =self.az[self.tinfo[idx][2]:] return self.tinfo[idx][0],self.tinfo[idx][1],zs[:find(zs,'\000')] | def info(self,t=None): idx=self.index(t)[0] zs =self.az[self.tinfo[idx][2]:] return self.tinfo[idx][0],self.tinfo[idx][1],zs[:find(zs,'\000')] | 29,725 |
def info(self,t=None): idx=self.index(t)[0] zs =self.az[self.tinfo[idx][2]:] return self.tinfo[idx][0],self.tinfo[idx][1],zs[:find(zs,'\000')] | def info(self,t=None): idx=self.index(t)[0] zs =self.az[self.tinfo[idx][2]:] return self.tinfo[idx][0],self.tinfo[idx][1],zs[:find(zs,'\000')] | 29,726 |
def _findLocalTimeZoneName(isDST): if not daylight: # Daylight savings does not occur in this time zone. isDST = 0 try: # Get the name of the current time zone depending # on DST. _localzone = _cache._zmap[lower(tzname[isDST])] except: try: # Generate a GMT-offset zone name. if isDST: localzone = altzone else: localzon... | def _findLocalTimeZoneName(isDST): if not daylight: # Daylight savings does not occur in this time zone. isDST = 0 try: # Get the name of the current time zone depending # on DST. _localzone = _cache._zmap[lower(tzname[isDST])] except: try: # Generate a GMT-offset zone name. if isDST: localzone = altzone else: localzon... | 29,727 |
def _calcDependentSecond(tz, t): # Calculates the timezone-dependent second (integer part only) # from the timezone-independent second. fset = _tzoffset(tz, t) return fset + long(math.floor(t)) + long(EPOCH) - 86400L | def _calcDependentSecond(tz, t): # Calculates the timezone-dependent second (integer part only) # from the timezone-independent second. fset = _tzoffset(tz, t) return fset + long(math.floor(t)) + long(EPOCH) - 86400L | 29,728 |
def safelocaltime(t): '''localtime with a safety zone.''' try: t_int = int(t) except OverflowError: raise 'TimeError', 'The time %f is beyond the range ' \ 'of this Python implementation.' % float(t) rval = localtime(t_int) return rval | def safelocaltime(t): '''localtime with a safety zone.''' try: t_int = int(t) except OverflowError: raise 'TimeError', 'The time %f is beyond the range ' \ 'of this Python implementation.' % float(t) rval = localtime(t_int) return rval | 29,729 |
def safelocaltime(t): '''localtime with a safety zone.''' try: t_int = int(t) except OverflowError: raise 'TimeError', 'The time %f is beyond the range ' \ 'of this Python implementation.' % float(t) rval = localtime(t_int) return rval | def safelocaltime(t): '''localtime with a safety zone.''' try: t_int = int(t) except OverflowError: raise 'TimeError', 'The time %f is beyond the range ' \ 'of this Python implementation.' % float(t) rval = localtime(t_int) return rval | 29,730 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,731 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,732 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,733 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,734 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,735 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,736 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,737 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,738 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,739 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,740 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,741 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,742 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,743 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,744 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,745 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,746 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,747 |
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 29,748 |
def localZone(self, ltm=None): '''Returns the time zone on the given date. The time zone can change according to daylight savings.''' if not DateTime._multipleZones: return DateTime._localzone0 if ltm == None: ltm = localtime(time()) isDST = ltm[8] lz = isDST and DateTime._localzone1 or DateTime._localzone0 return lz | def localZone(self, ltm=None): '''Returns the time zone on the given date. The time zone can change according to daylight savings.''' if not DateTime._multipleZones: return DateTime._localzone0 if ltm == None: ltm = localtime(time()) isDST = ltm[8] lz = isDST and DateTime._localzone1 or DateTime._localzone0 return lz | 29,749 |
def _parse(self,string): # Parse date-time components from a string month=year=tz=tm=None spaces =self.space_chars intpat =self.int_pattern fltpat =self.flt_pattern wordpat =self.name_pattern delimiters =self.delimiters MonthNumbers =self._monthmap DayOfWeekNames=self._daymap ValidZones ... | def _parse(self,string): # Parse date-time components from a string month=year=tz=tm=None spaces =self.space_chars intpat =self.int_pattern fltpat =self.flt_pattern wordpat =self.name_pattern delimiters =self.delimiters MonthNumbers =self._monthmap DayOfWeekNames=self._daymap ValidZones ... | 29,750 |
def _parse(self,string): # Parse date-time components from a string month=year=tz=tm=None spaces =self.space_chars intpat =self.int_pattern fltpat =self.flt_pattern wordpat =self.name_pattern delimiters =self.delimiters MonthNumbers =self._monthmap DayOfWeekNames=self._daymap ValidZones ... | def _parse(self,string): # Parse date-time components from a string month=year=tz=tm=None spaces =self.space_chars intpat =self.int_pattern fltpat =self.flt_pattern wordpat =self.name_pattern delimiters =self.delimiters MonthNumbers =self._monthmap DayOfWeekNames=self._daymap ValidZones ... | 29,751 |
def _parse(self,string): # Parse date-time components from a string month=year=tz=tm=None spaces =self.space_chars intpat =self.int_pattern fltpat =self.flt_pattern wordpat =self.name_pattern delimiters =self.delimiters MonthNumbers =self._monthmap DayOfWeekNames=self._daymap ValidZones ... | def _parse(self,string): # Parse date-time components from a string month=year=tz=tm=None spaces =self.space_chars intpat =self.int_pattern fltpat =self.flt_pattern wordpat =self.name_pattern delimiters =self.delimiters MonthNumbers =self._monthmap DayOfWeekNames=self._daymap ValidZones ... | 29,752 |
def _parse(self,string): # Parse date-time components from a string month=year=tz=tm=None spaces =self.space_chars intpat =self.int_pattern fltpat =self.flt_pattern wordpat =self.name_pattern delimiters =self.delimiters MonthNumbers =self._monthmap DayOfWeekNames=self._daymap ValidZones ... | def _parse(self,string): # Parse date-time components from a string month=year=tz=tm=None spaces =self.space_chars intpat =self.int_pattern fltpat =self.flt_pattern wordpat =self.name_pattern delimiters =self.delimiters MonthNumbers =self._monthmap DayOfWeekNames=self._daymap ValidZones ... | 29,753 |
def _parse(self,string): # Parse date-time components from a string month=year=tz=tm=None spaces =self.space_chars intpat =self.int_pattern fltpat =self.flt_pattern wordpat =self.name_pattern delimiters =self.delimiters MonthNumbers =self._monthmap DayOfWeekNames=self._daymap ValidZones ... | def _parse(self,string): # Parse date-time components from a string month=year=tz=tm=None spaces =self.space_chars intpat =self.int_pattern fltpat =self.flt_pattern wordpat =self.name_pattern delimiters =self.delimiters MonthNumbers =self._monthmap DayOfWeekNames=self._daymap ValidZones ... | 29,754 |
def greaterThan(self,t): """Compare this DateTime object to another DateTime object OR a floating point number such as that which is returned by the python time module. Returns true if the object represents a date/time greater than the specified DateTime or time module style time. Revised to give more correct results t... | def greaterThan(self,t): """Compare this DateTime object to another DateTime object OR a floating point number such as that which is returned by the python time module. Returns true if the object represents a date/time greater than the specified DateTime or time module style time. Revised to give more correct results t... | 29,755 |
def greaterThanEqualTo(self,t): """Compare this DateTime object to another DateTime object OR a floating point number such as that which is returned by the python time module. Returns true if the object represents a date/time greater than or equal to the specified DateTime or time module style time. Revised to give mor... | def greaterThanEqualTo(self,t): """Compare this DateTime object to another DateTime object OR a floating point number such as that which is returned by the python time module. Returns true if the object represents a date/time greater than or equal to the specified DateTime or time module style time. Revised to give mor... | 29,756 |
def greaterThanEqualTo(self,t): """Compare this DateTime object to another DateTime object OR a floating point number such as that which is returned by the python time module. Returns true if the object represents a date/time greater than or equal to the specified DateTime or time module style time. Revised to give mor... | def greaterThanEqualTo(self,t): """Compare this DateTime object to another DateTime object OR a floating point number such as that which is returned by the python time module. Returns true if the object represents a date/time greater than or equal to the specified DateTime or time module style time. Revised to give mor... | 29,757 |
def equalTo(self,t): """Compare this DateTime object to another DateTime object OR a floating point number such as that which is returned by the python time module. Returns true if the object represents a date/time equal to the specified DateTime or time module style time. Revised to give more correct results through c... | def equalTo(self,t): """Compare this DateTime object to another DateTime object OR a floating point number such as that which is returned by the python time module. Returns true if the object represents a date/time equal to the specified DateTime or time module style time. Revised to give more correct results through c... | 29,758 |
def notEqualTo(self,t): """Compare this DateTime object to another DateTime object OR a floating point number such as that which is returned by the python time module. Returns true if the object represents a date/time not equal to the specified DateTime or time module style time. Revised to give more correct results th... | def notEqualTo(self,t): """Compare this DateTime object to another DateTime object OR a floating point number such as that which is returned by the python time module. Returns true if the object represents a date/time not equal to the specified DateTime or time module style time. Revised to give more correct results th... | 29,759 |
def lessThan(self,t): """Compare this DateTime object to another DateTime object OR a floating point number such as that which is returned by the python time module. Returns true if the object represents a date/time less than the specified DateTime or time module style time. Revised to give more correct results through... | def lessThan(self,t): """Compare this DateTime object to another DateTime object OR a floating point number such as that which is returned by the python time module. Returns true if the object represents a date/time less than the specified DateTime or time module style time. Revised to give more correct results through... | 29,760 |
def lessThanEqualTo(self,t): """Compare this DateTime object to another DateTime object OR a floating point number such as that which is returned by the python time module. Returns true if the object represents a date/time less than or equal to the specified DateTime or time module style time. Revised to give more corr... | def lessThanEqualTo(self,t): """Compare this DateTime object to another DateTime object OR a floating point number such as that which is returned by the python time module. Returns true if the object represents a date/time less than or equal to the specified DateTime or time module style time. Revised to give more corr... | 29,761 |
def Day(self): """Return the full name of the day of the week""" return self._fday | def Day(self): """Return the full name of the day of the week""" return self._fday | 29,762 |
def TimeMinutes(self): """Return the time string for an object not showing seconds.""" return '%2.2d:%2.2d' % (self._hour,self._minute) | def TimeMinutes(self): """Return the time string for an object not showing seconds.""" return '%2.2d:%2.2d' % (self._hour,self._minute) | 29,763 |
def __add__(self,other): """A DateTime may be added to a number and a number may be added to a DateTime; two DateTimes cannot be added.""" if hasattr(other,'_t'): raise self.DateTimeError,'Cannot add two DateTimes' o=float(other) tz = self._tz t = (self._t + (o*86400.0)) d = (self._d + o) s = d - math.floor(d) ms = t ... | def __add__(self,other): """A DateTime may be added to a number and a number may be added to a DateTime; two DateTimes cannot be added.""" if hasattr(other,'_t'): raise self.DateTimeError,'Cannot add two DateTimes' o=float(other) tz = self._tz t = (self._t + (o*86400.0)) d = (self._d + o) s = d - math.floor(d) ms = t ... | 29,764 |
def __sub__(self,other): """Either a DateTime or a number may be subtracted from a DateTime, however, a DateTime may not be subtracted from a number.""" if hasattr(other, '_d'): if 0: # This logic seems right but is incorrect. my_t = self._t + _tzoffset(self._tz, self._t) ob_t = other._t + _tzoffset(other._tz, other._... | def __sub__(self,other): """Either a DateTime or a number may be subtracted from a DateTime, however, a DateTime may not be subtracted from a number.""" if hasattr(other, '_d'): if 0: # This logic seems right but is incorrect. my_t = self._t + _tzoffset(self._tz, self._t) ob_t = other._t + _tzoffset(other._tz, other._... | 29,765 |
def __repr__(self): """Convert a DateTime to a string that looks like a Python expression.""" return '%s(\'%s\')' % (self.__class__.__name__,str(self)) | def __repr__(self): """Convert a DateTime to a string that looks like a Python expression.""" return '%s(\'%s\')' % (self.__class__.__name__,str(self)) | 29,766 |
def __str__(self): """Convert a DateTime to a string.""" y,m,d =self._year,self._month,self._day h,mn,s,t=self._hour,self._minute,self._second,self._tz if(h+mn+s): if (s-int(s))> 0.0001: try: # For the seconds, print two digits # before the decimal point. subsec = split('%g' % s, '.')[1] return '%4.4d/%2.2d/%2.2d %2.... | def __str__(self): """Convert a DateTime to a string.""" y,m,d =self._year,self._month,self._day h,mn,s,t=self._hour,self._minute,self._second,self._tz if(h+mn+s): if (s-int(s))> 0.0001: try: # For the seconds, print two digits # before the decimal point. subsec = split('%g' % s, '.')[1] return '%4.4d/%2.2d/%2.2d %2.... | 29,767 |
def __cmp__(self,obj): """Compare a DateTime with another DateTime object, or a float such as those returned by time.time(). | def __cmp__(self,obj): """Compare a DateTime with another DateTime object, or a float such as those returned by time.time(). | 29,768 |
def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | 29,769 |
def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | 29,770 |
def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | 29,771 |
def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | 29,772 |
def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | 29,773 |
def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | 29,774 |
def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | 29,775 |
def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | 29,776 |
def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | 29,777 |
def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | def __parse_iso8601(self,s): """ parse an ISO 8601 compliant date """ year=0 month=day=1 hour=minute=seconds=hour_off=min_off=0 datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') timereg = re.compile('([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') # Date part fields = datereg.split(s.st... | 29,778 |
def _authenticate(self): h = self.headers if auth_str and (not h.has_key('x-auth') or h['x-auth'] != auth_str): raise 'Unauthorized', 'X-Auth header missing or incorrect' | def _authenticate(self): h = self.headers if auth_str and (not h.has_key('x-auth') or h['x-auth'] != auth_str): raise 'Unauthorized', 'X-Auth header missing or incorrect' | 29,779 |
def _addmethod(self, name, sig, linestart, lineend = None, to_bottom = 1): if not lineend: lineend = linestart self.methods[name] = CodeBlock(sig, linestart, lineend) if to_bottom: self.method_order.append(name) else: self.method_order.insert(0, name) self.extend_extent(lineend) | def _addmethod(self, name, sig, linestart, lineend = None, to_bottom = 1): if not lineend: lineend = linestart self.methods[name] = CodeBlock(sig, linestart, lineend) if to_bottom: self.method_order.append(name) else: self.method_order.insert(0, name) self.extend_extent(lineend) | 29,780 |
def addIds(self, lst): if self.id is not None: lst.append(self.id) | def addIds(self, lst): if self.id is not None: lst.append(self.id) | 29,781 |
def addIds(self, lst): for constr in self.textConstrLst: lst.append(constr.params[self.idProp]) | def addIds(self, lst): for constr in self.textConstrLst: lst.append(constr.params[self.idProp]) | 29,782 |
def __init__(self, name, designer, objClass): UtilityDTC.__init__(self, name, designer, objClass) self.editors.update({'Entries': CollectionPropEdit}) self.subCompanions['Entries'] = AcceleratorTableEntriesCDTC | def __init__(self, name, designer, objClass): UtilityDTC.__init__(self, name, designer, objClass) self.editors.update({'Entries': CollectionPropEdit}) self.subCompanions['Entries'] = AcceleratorTableEntriesCDTC | 29,783 |
def designTimeSource(self): return {'choices':'[]'} | defdesignTimeSource(self):return{'choices':'[]'} | 29,784 |
def __init__(self, name, designer, parentCompanion, ctrl): CollectionDTC.__init__(self, name, designer, parentCompanion, ctrl) | def__init__(self,name,designer,parentCompanion,ctrl):CollectionDTC.__init__(self,name,designer,parentCompanion,ctrl) | 29,785 |
def __init__(self, name, designer, parentCompanion, ctrl): CollectionDTC.__init__(self, name, designer, parentCompanion, ctrl) | def __init__(self, name, designer, parentCompanion, ctrl): CollectionDTC.__init__(self, name, designer, parentCompanion, ctrl) | 29,786 |
def SetName(self, oldName, newName): CollectionDTC.SetName(self, oldName, newName) | def SetName(self, oldName, newName): CollectionDTC.SetName(self, oldName, newName) | 29,787 |
## def __init__(self, name, designer, parent, ctrlClass): | ## def __init__(self, name, designer, parent, ctrlClass): | 29,788 |
def vetoedMethods(self): return UtilityDTC.vetoedMethods(self)+['GetPosition', 'SetPosition', 'GetSize', 'SetSize'] | def vetoedMethods(self): return UtilityDTC.vetoedMethods(self)+['GetPosition', 'SetPosition', 'GetSize', 'SetSize'] | 29,789 |
def __init__(self, name, designer, parentCompanion, ctrl): CollectionDTC.__init__(self, name, designer, parentCompanion, ctrl) self.editors.update({'Menu': MenuEnumConstrPropEdit, 'Title': StrConstrPropEdit}) | def __init__(self, name, designer, parentCompanion, ctrl): CollectionDTC.__init__(self, name, designer, parentCompanion, ctrl) self.editors.update({'Menu': MenuEnumConstrPropEdit, 'Title': StrConstrPropEdit}) | 29,790 |
## def deleteItem(self, idx): | ## def deleteItem(self, idx): | 29,791 |
## def properties(self): | ## def properties(self): | 29,792 |
def OnSave(self, event): ZopeController.OnSave(self, event) # trigger a reload after saving so that errors saved as comments in the # source are displayed self.OnReload(event) | def OnSave(self, event): ZopeController.OnSave(self, event) # trigger a reload after saving so that errors saved as comments in the # source are displayed self.OnReload(event) | 29,793 |
def generatePage(self): props = self.model.zopeObj.properties url = 'http://%s:%d/%s/source.html'%(props['host'], props['httpport'], self.model.zopeObj.whole_name()) urllib._urlopener = gfurlo = GUIFancyURLopener() gfurlo._user_prompt = props['name'] gfurlo._passwd_prompt = props['passwd'] try: f = urllib.urlopen(url) ... | def generatePage(self): props = self.model.zopeObj.properties url = 'http://%s:%s@%s:%d/%s/source.html'%(props['username'], props['passwd'], props['host'], props['httpport'], self.model.zopeObj.whole_name()) urllib._urlopener = gfurlo = GUIFancyURLopener() gfurlo._user_prompt = props['name'] gfurlo._passwd_prompt = pro... | 29,794 |
def generatePage(self): props = self.model.zopeObj.properties url = 'http://%s:%d/%s/source.html'%(props['host'], props['httpport'], self.model.zopeObj.whole_name()) urllib._urlopener = gfurlo = GUIFancyURLopener() gfurlo._user_prompt = props['name'] gfurlo._passwd_prompt = props['passwd'] try: f = urllib.urlopen(url) ... | def generatePage(self): props = self.model.zopeObj.properties url = 'http://%s:%d/%s/source.html'%(props['host'], props['httpport'], self.model.zopeObj.whole_name()) urllib._urlopener = gfurlo = GUIFancyURLopener() gfurlo._user_prompt = props['name'] gfurlo._passwd_prompt = props['passwd'] try: f = urllib.urlopen(url) ... | 29,795 |
>>> def foo(x, y, z=-1.0, *args, **kw): | >>> def foo(x, y, z=-1.0, *args, **kw): | 29,796 |
>>> def foo(x, y, z=-1.0, *args, **kw): | >>> def foo(x, y, z=-1.0, *args, **kw): | 29,797 |
>>> def foo(x, y, z=-1.0, *args, **kw): | >>> def foo(x, y, z=-1.0, *args, **kw): | 29,798 |
>>> def foo(x, y, z=-1.0, *args, **kw): | >>> def foo(x, y, z=-1.0, *args, **kw): | 29,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.