bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def __init__(self,*args): """Return a new date-time object | def __init__(self,*args): """Return a new date-time object | 4,200 |
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 ... | 4,201 |
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 ... | 4,202 |
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 ... | 4,203 |
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 ... | 4,204 |
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 ... | 4,205 |
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 ... | 4,206 |
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 ... | 4,207 |
def manage_addFolder(self,id,title='',createPublic=0,createUserF=0, REQUEST=None): """Add a new Folder object with id *id*. If the 'createPublic' and 'createUserF' parameters are set to any true value, an 'index_html' and a 'UserFolder' objects are created respectively in the new folder. """ i=Folder() i.id=id i.title... | def manage_addFolder(self,id,title='',createPublic=0,createUserF=0, REQUEST=None): """Add a new Folder object with id *id*. If the 'createPublic' and 'createUserF' parameters are set to any true value, an 'index_html' and a 'UserFolder' objects are created respectively in the new folder. """ i=Folder() i.id=id i.title... | 4,208 |
def _argdata(self,REQUEST,raw=0,return_missing_keys=0): | def _argdata(self,REQUEST,raw=0,return_missing_keys=0): | 4,209 |
def default_input_form(id,arguments,action='query'): if arguments: return ( "%s\n%s%s" % ( '<html><head><title>%s Input Data</title></head><body>\n' '<form action="<!--#var URL2-->/<!--#var id-->/%s" ' 'method="get">\n' '<h2>%s Input Data</h2>\n' 'Enter query parameters:<br>' '<table>\n' % (id,action,id), string.joinfi... | def default_input_form(id,arguments,action='query'): if arguments: return ( "%s\n%s%s" % ( '<html><head><title>%s Input Data</title></head><body>\n' '<form action="<!--#var URL2-->/<!--#var id-->/%s" ' 'method="get">\n' '<h2>%s Input Data</h2>\n' 'Enter query parameters:<br>' '<table>\n' % (id,action,id), string.joinfi... | 4,210 |
def manage_addVocabulary(self, id, title, globbing=None, REQUEST=None): """Add a Vocabulary object """ id=str(id) title=str(title) if globbing: globbing=1 c=Vocabulary(id, title, globbing) self._setObject(id, c) if REQUEST is not None: return self.manage_main(self,REQUEST) | def manage_addVocabulary(self, id, title, globbing=None, REQUEST=None): """Add a Vocabulary object """ id=str(id) title=str(title) if globbing: globbing=1 c=Vocabulary(id, title, globbing) self._setObject(id, c) if REQUEST is not None: return self.manage_main(self,REQUEST) | 4,211 |
def hasRole(self,parent,roles=None): | def hasRole(self,parent,roles=None): | 4,212 |
def hasRole(self,parent,roles=None): | def hasRole(self,parent,roles=None): | 4,213 |
def tearDown(self): if self.thread: self.httpd.server_close() self.thread.join() | def tearDown(self): if self.thread: self.httpd.server_close() self.thread.join() | 4,214 |
def validate(self, inst, parent, name, value, md): | def validate(self, inst, parent, name, value, md): | 4,215 |
def getRolesInContext(self, object): """Return the list of roles assigned to the user, including local roles assigned in context of the passed in object.""" name=self.getUserName() roles=self.getRoles() local={} object=getattr(object, 'aq_inner', object) while 1: if hasattr(object, '__ac_local_roles__'): local_roles=ob... | def getRolesInContext(self, object): """Return the list of roles assigned to the user, including local roles assigned in context of the passed in object.""" name=self.getUserName() roles=self.getRoles() local={} object=getattr(object, 'aq_inner', object) while 1: local_roles = getattr(object, '__ac_local_roles__', None... | 4,216 |
def getRolesInContext(self, object): """Return the list of roles assigned to the user, including local roles assigned in context of the passed in object.""" name=self.getUserName() roles=self.getRoles() local={} object=getattr(object, 'aq_inner', object) while 1: if hasattr(object, '__ac_local_roles__'): local_roles=ob... | def getRolesInContext(self, object): """Return the list of roles assigned to the user, including local roles assigned in context of the passed in object.""" name=self.getUserName() roles=self.getRoles() local={} object=getattr(object, 'aq_inner', object) while 1: if hasattr(object, '__ac_local_roles__'): local_roles=ob... | 4,217 |
def getRolesInContext(self, object): """Return the list of roles assigned to the user, including local roles assigned in context of the passed in object.""" name=self.getUserName() roles=self.getRoles() local={} object=getattr(object, 'aq_inner', object) while 1: if hasattr(object, '__ac_local_roles__'): local_roles=ob... | defgetRolesInContext(self,object):"""Returnthelistofrolesassignedtotheuser,includinglocalrolesassignedincontextofthepassedinobject."""name=self.getUserName()roles=self.getRoles()local={}object=getattr(object,'aq_inner',object)while1:ifhasattr(object,'__ac_local_roles__'):local_roles=object.__ac_local_roles__ifcallable(... | 4,218 |
def _get_id(self, id): # Allow containers to override the generation of # object copy id by attempting to call its _get_id # method, if it exists. n=0 if (len(id) > 8) and (id[8:]=='copy_of_'): n=1 orig_id=id while 1: if self._getOb(id, None) is None: return id id='copy%s_of_%s' % (n and n+1 or '', orig_id) n=n+1 | def _get_id(self, id): # Allow containers to override the generation of # object copy id by attempting to call its _get_id # method, if it exists. copy_match=self.copy_re.match(id) if (copy_match) and (copy_match.end() < len(id)): n=1 orig_id=id while 1: if self._getOb(id, None) is None: return id id='copy%s_of_%s' % (... | 4,219 |
def _get_id(self, id): # Allow containers to override the generation of # object copy id by attempting to call its _get_id # method, if it exists. n=0 if (len(id) > 8) and (id[8:]=='copy_of_'): n=1 orig_id=id while 1: if self._getOb(id, None) is None: return id id='copy%s_of_%s' % (n and n+1 or '', orig_id) n=n+1 | def _get_id(self, id): # Allow containers to override the generation of # object copy id by attempting to call its _get_id # method, if it exists. n=0 if (len(id) > 8) and (id[8:]=='copy_of_'): n=1 orig_id=self.copy_re.sub('', id) else: n=0 orig_id=id while 1: if self._getOb(id, None) is None: return id id='copy%s_of_%... | 4,220 |
def manage_pasteObjects(self, cb_copy_data=None, REQUEST=None): """Paste previously copied objects into the current object. If calling manage_pasteObjects from python code, pass the result of a previous call to manage_cutObjects or manage_copyObjects as the first argument.""" cp=None if cb_copy_data is not None: cp=cb_... | def manage_pasteObjects(self, cb_copy_data=None, REQUEST=None): """Paste previously copied objects into the current object. If calling manage_pasteObjects from python code, pass the result of a previous call to manage_cutObjects or manage_copyObjects as the first argument.""" cp=None if cb_copy_data is not None: cp=cb_... | 4,221 |
def _construct(self, context, id, final): """Creates and returns the named folder.""" dispatcher = guarded_getattr(context, 'manage_addProduct')['OFSP'] factory = guarded_getattr(dispatcher, 'manage_addFolder') factory(id) o = context.restrictedTraverse(id) # Commit a subtransaction to assign the new object to # the co... | def _construct(self, context, id): """Creates and returns the named folder.""" dispatcher = guarded_getattr(context, 'manage_addProduct')['OFSP'] factory = guarded_getattr(dispatcher, 'manage_addFolder') factory(id) o = context.restrictedTraverse(id) # Commit a subtransaction to assign the new object to # the correct d... | 4,222 |
def render(self,md): | defrender(self,md): | 4,223 |
def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make... | deftpRender(self,md,section):#Checkforcollapseall,expandall,andstatetry:collapse_all=md['collapse_all']except:collapse_all=Noneifcollapse_all:state=[]else:try:expand_all=md['expand_all']except:expand_all=Noneifexpand_all:#incaseofexpandall-tomaintainstatecorrectlywe#havetomakestatebetheidsofALLsubobjectswhich#arenon-em... | 4,224 |
def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make... | def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to m... | 4,225 |
def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make... | def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to m... | 4,226 |
def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make... | def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make... | 4,227 |
def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make... | def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make... | 4,228 |
def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make... | deftpRender(self,md,section):#Checkforcollapseall,expandall,andstatetry:collapse_all=md['collapse_all']except:collapse_all=Noneifcollapse_all:state=[]else:try:expand_all=md['expand_all']except:expand_all=Noneifexpand_all:#incaseofexpandall-tomaintainstatecorrectlywe#havetomakestatebetheidsofALLsubobjectswhich#arenon-em... | 4,229 |
def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make... | deftpRender(self,md,section):#Checkforcollapseall,expandall,andstatetry:collapse_all=md['collapse_all']except:collapse_all=Noneifcollapse_all:state=[]else:try:expand_all=md['expand_all']except:expand_all=Noneifexpand_all:#incaseofexpandall-tomaintainstatecorrectlywe#havetomakestatebetheidsofALLsubobjectswhich#arenon-em... | 4,230 |
def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make... | def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make... | 4,231 |
def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make... | def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make... | 4,232 |
def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make... | deftpRender(self,md,section):#Checkforcollapseall,expandall,andstatetry:collapse_all=md['collapse_all']except:collapse_all=Noneifcollapse_all:state=[]else:try:expand_all=md['expand_all']except:expand_all=Noneifexpand_all:#incaseofexpandall-tomaintainstatecorrectlywe#havetomakestatebetheidsofALLsubobjectswhich#arenon-em... | 4,233 |
def tpValuesIds(self): r=[] try: for item in self.tpValues(): try: id=item.tpId() e=tpValuesIds(item) if e: id=[id,e] else: id=[id] r.append(id) except: pass except: pass return r | def tpValuesIds(self): r=[] try: for item in self.tpValues(): try: if item.tpValues(): id=item.tpId() e=tpValuesIds(item) if e: id=[id,e] else: id=[id] r.append(id) except: pass except: pass return r | 4,234 |
def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | 4,235 |
def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=... | 4,236 |
def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | 4,237 |
def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | 4,238 |
def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | 4,239 |
def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | 4,240 |
def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | deftpRenderTABLE(self,root_url,url,state,substate,data,colspan,section,md,treeData,level=0):#Wearebeingcalledfromabovetry:items=self.tpValues()except:items=NonetpUrl=self.tpURL()url=(urland('%s/%s'%(url,tpUrl)))ortpUrltreeData['tree-item-url']=urltry:id=self.tpId()except:id=NoneifidisNone:try:id=self._p_oidexcept:id=No... | 4,241 |
def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | 4,242 |
def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | 4,243 |
def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | 4,244 |
def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | deftpRenderTABLE(self,root_url,url,state,substate,data,colspan,section,md,treeData,level=0):#Wearebeingcalledfromabovetry:items=self.tpValues()except:items=NonetpUrl=self.tpURL()url=(urland('%s/%s'%(url,tpUrl)))ortpUrltreeData['tree-item-url']=urltry:id=self.tpId()except:id=NoneifidisNone:try:id=self._p_oidexcept:id=No... | 4,245 |
def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=Non... | 4,246 |
def parseSubstitution(arg, position=(None, None)): m = _subst_re.match(arg) if not m: raise TALError("Bad syntax in substitution text: " + `onError`, position) key, expr = m.group(1, 2) if not key: key = "text" return key, expr | def parseSubstitution(arg, position=(None, None)): m = _subst_re.match(arg) if not m: raise TALError("Bad syntax in substitution text: " + `arg`, position) key, expr = m.group(1, 2) if not key: key = "text" return key, expr | 4,247 |
def __getitem__(self,index): | def __getitem__(self,index): | 4,248 |
def __init__(self, id, title, file, permissions=None, categories=None): self.id=id self.title=title if string.rfind(file, '.dtml') == len(file) -5: file=file[:-5] self.index_html=HTMLFile(file,'') if permissions is not None: self.permissions=permissions if categories is not None: self.categories=categories | def __init__(self, id, title, file, permissions=None, categories=None): self.id=id self.title=title file,ext=os.path.splitext(file) prefix,file=os.path.split(file) self.index_html=HTMLFile(file,prefix) if permissions is not None: self.permissions=permissions if categories is not None: self.categories=categories | 4,249 |
def SearchableText(self): "The full text of the Help Topic, for indexing purposes" return '%s %s' % (self.title, self.obj.read()) | def SearchableText(self): "The full text of the Help Topic, for indexing purposes" return '%s %s' % (self.title, self.obj.read()) | 4,250 |
def filtered_manage_options(self, REQUEST=None): | def filtered_manage_options(self, REQUEST=None): | 4,251 |
def index_object(self, documentId, obj, threshold=None): """ index an object 'obj' with integer id 'i' | def index_object(self, documentId, obj, threshold=None): """ index an object 'obj' with integer id 'i' | 4,252 |
def index_object(self, documentId, obj, threshold=None): """ index an object 'obj' with integer id 'i' | def index_object(self, documentId, obj, threshold=None): """ index an object 'obj' with integer id 'i' | 4,253 |
def doc_href( self, s, expr1 = re.compile("(\"[ a-zA-Z0-9\n\-\.\,\;\(\)\/\:\/]+\")(:)([a-zA-Z0-9\:\/\.\~\-]+)([,]*\s*)").search, expr2 = re.compile('(\"[ a-zA-Z0-9\n\-\.\:\;\(\)\/]+\")([,]+\s+)([a-zA-Z0-9\@\.\,\?\!\/\:\;\-\#]+)(\s*)').search): #expr1=re.compile('\"([ a-zA-Z0-9.:/;,\n\~\(\)\-]+)\"' # ... | def doc_href( self, s, expr1 = re.compile("(\"[ a-zA-Z0-9\n\-\.\,\;\(\)\/\:\/]+\")(:)([a-zA-Z0-9\:\/\.\~\-]+)([,]*\s*)").search, expr2 = re.compile('(\"[ a-zA-Z0-9\n\-\.\:\;\(\)\/]+\")([,]+\s+)([a-zA-Z0-9\@\.\,\?\!\/\:\;\-\#]+)(\s*)').search): #expr1=re.compile('\"([ a-zA-Z0-9.:/;,\n\~\(\)\-]+)\"' # ... | 4,254 |
def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw): """Render the document given a client object, REQUEST mapping, Response, and key word arguments.""" | def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw): """Render the document given a client object, REQUEST mapping, Response, and key word arguments.""" | 4,255 |
def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw): """Render the document given a client object, REQUEST mapping, Response, and key word arguments.""" | def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw): """Render the document given a client object, REQUEST mapping, Response, and key word arguments.""" | 4,256 |
def __init__(self, args, fmt=''): | def __init__(self, args, fmt=''): | 4,257 |
def hasSessionData(self): """ """ if self.getBrowserIdManager().getToken(create=0): if self._hasSessionDataObject(key): return 1 | def hasSessionData(self): """ """ key = self.getBrowserIdManager().getToken(create=0) if key: if self._hasSessionDataObject(key): return 1 | 4,258 |
def modified_in_version(self): """Was the object modified in this version? """ jar=self._p_jar oid=self._p_oid if jar is None or oid is None: return None try: mv=jar.db().modifiedInVersion except: pass else: return mv()==jar.getVersion() | def modified_in_version(self): """Was the object modified in this version? """ jar=self._p_jar oid=self._p_oid if jar is None or oid is None: return None try: mv=jar.db().modifiedInVersion except: pass else: return mv()==jar.getVersion() | 4,259 |
def index_html(self, REQUEST, RESPONSE): """ The default view of the contents of a File or Image. | def index_html(self, REQUEST, RESPONSE): """ The default view of the contents of a File or Image. | 4,260 |
def _construct(self, context, id): """Creates and returns the named object.""" jar = self.base._p_jar klass = jar.db().classFactory(jar, self.module_name, self.class_name) obj = klass(id) obj._setId(id) context._setObject(id, obj) obj = context.unrestrictedTraverse(id) # Commit a subtransaction to assign the new object... | def _construct(self, context, id): """Creates and returns the named object.""" jar = self.base._p_jar klass = jar.db().classFactory(jar, self.module_name, self.class_name) obj = klass(id) obj._setId(id) context._setObject(id, obj) obj = context.unrestrictedTraverse(id) # Commit a subtransaction to assign the new object... | 4,261 |
def _traverseToMountedRoot(self, root, mount_parent): """Hook for getting the object to be mounted. """ params = self._v_mount_params if params is None: params = self._loadMountParams() real_root, real_path, container_class = params if real_root is None: real_root = 'Application' try: obj = root[real_root] except KeyEr... | def _traverseToMountedRoot(self, root, mount_parent): """Hook for getting the object to be mounted. """ params = self._v_mount_params if params is None: params = self._loadMountParams() real_root, real_path, container_class = params if real_root is None: real_root = 'Application' try: obj = root[real_root] except KeyEr... | 4,262 |
def _traverseToMountedRoot(self, root, mount_parent): """Hook for getting the object to be mounted. """ params = self._v_mount_params if params is None: params = self._loadMountParams() real_root, real_path, container_class = params if real_root is None: real_root = 'Application' try: obj = root[real_root] except KeyEr... | def _traverseToMountedRoot(self, root, mount_parent): """Hook for getting the object to be mounted. """ params = self._v_mount_params if params is None: params = self._loadMountParams() real_root, real_path, container_class = params if real_root is None: real_root = 'Application' try: obj = root[real_root] except KeyEr... | 4,263 |
def clear(self): | def clear(self): | 4,264 |
def locked_in_version(self): return 0 | def locked_in_version(self): return 0 | 4,265 |
def get_refcounts(self, n=100, t=(type(Fake), type(Acquisition.Implicit))): # get class refcount info | def get_refcounts(self, n=100, t=(type(Fake), type(Acquisition.Implicit))): # get class refcount info | 4,266 |
def get_refcounts(self, n=100, t=(type(Fake), type(Acquisition.Implicit))): # get class refcount info | def get_refcounts(self, n=100, t=(type(Fake), type(Acquisition.Implicit))): # get class refcount info | 4,267 |
def get_refcounts(self, n=100, t=(type(Fake), type(Acquisition.Implicit))): # get class refcount info | def get_refcounts(self, n=100, t=(type(Fake), type(Acquisition.Implicit))): # get class refcount info | 4,268 |
def get_refcounts(self, n=100, t=(type(Fake), type(Acquisition.Implicit))): # get class refcount info | def get_refcounts(self, n=100, t=(type(Fake), type(Acquisition.Implicit))): # get class refcount info | 4,269 |
def __call__(self, REQUEST=None, __ick__=None, src__=0, **kw): | def __call__(self, REQUEST=None, __ick__=None, src__=0, **kw): | 4,270 |
def _argdata(self, REQUEST): | def _argdata(self, REQUEST): | 4,271 |
def document_src(self, REQUEST=None, RESPONSE=None): """Return expanded document source.""" | def document_src(self, REQUEST=None, RESPONSE=None): """Return expanded document source.""" | 4,272 |
def __init__(self, mnem, class_name, base_class = '', code = None, opt_args = [], *extras): self.mnemonic = mnem self.class_name = class_name self.base_class = base_class if code: #If the user already made a CodeBlock, pick the parts from it if isinstance(code, CodeBlock): origCode = code.orig_code codeBlock = code els... | def __init__(self, mnem, class_name, base_class = '', code = None, opt_args = [], extras = {}): self.mnemonic = mnem self.class_name = class_name self.base_class = base_class if code: #If the user already made a CodeBlock, pick the parts from it if isinstance(code, CodeBlock): origCode = code.orig_code codeBlock = code... | 4,273 |
def __init__(self, mnem, class_name, base_class = '', code = None, opt_args = [], *extras): self.mnemonic = mnem self.class_name = class_name self.base_class = base_class if code: #If the user already made a CodeBlock, pick the parts from it if isinstance(code, CodeBlock): origCode = code.orig_code codeBlock = code els... | def __init__(self, mnem, class_name, base_class = '', code = None, opt_args = [], *extras): self.mnemonic = mnem self.class_name = class_name self.base_class = base_class if code: #If the user already made a CodeBlock, pick the parts from it if isinstance(code, CodeBlock): origCode = code.orig_code codeBlock = code els... | 4,274 |
def __init__(self, mnem, class_name, base_class = '', code = None, opt_args = [], *extras): self.mnemonic = mnem self.class_name = class_name self.base_class = base_class if code: #If the user already made a CodeBlock, pick the parts from it if isinstance(code, CodeBlock): origCode = code.orig_code codeBlock = code els... | def __init__(self, mnem, class_name, base_class = '', code = None, opt_args = [], *extras): self.mnemonic = mnem self.class_name = class_name self.base_class = base_class if code: #If the user already made a CodeBlock, pick the parts from it if isinstance(code, CodeBlock): origCode = code.orig_code codeBlock = code els... | 4,275 |
def _convert(cls, value): if value == Nxone: return | def _convert(cls, value): if value == None: return | 4,276 |
def __init__(cls, name, bases, dict): super(MetaConfigNode, cls).__init__(name, bases, dict) | def __init__(cls, name, bases, dict): super(MetaConfigNode, cls).__init__(name, bases, dict) | 4,277 |
def __init__(cls, name, bases, dict): super(MetaConfigNode, cls).__init__(name, bases, dict) | def __init__(cls, name, bases, dict): super(MetaConfigNode, cls).__init__(name, bases, dict) | 4,278 |
def __init__(cls, name, bases, dict): super(MetaConfigNode, cls).__init__(name, bases, dict) | def __init__(cls, name, bases, dict): super(MetaConfigNode, cls).__init__(name, bases, dict) | 4,279 |
def __init__(cls, name, bases, dict): super(MetaConfigNode, cls).__init__(name, bases, dict) | def __init__(cls, name, bases, dict): super(MetaConfigNode, cls).__init__(name, bases, dict) | 4,280 |
def disp(*args): print "%-35s %12s %12s %4s %5s %5s %5s %10s" % args | def disp(*args): print "%-35s %12s %12s %4s %5s %5s %5s %10s" % args | 4,281 |
def disp(*args): print "%-35s %12s %12s %4s %5s %5s %5s %10s" % args | def disp(*args): print "%-35s %12s %12s %4s %5s %5s %5s %10s" % args | 4,282 |
def display(): if options.graph: output.graph(command, options.graphdir, proxy) else: output.display(command, options.binned, options.printmode) | def display(): if options.graph: output.graph(command, options.graphdir, proxy) else: output.display(command, options.binned, options.printmode) | 4,283 |
def display(): if options.graph: output.graph(command, options.graphdir, proxy) else: output.display(command, options.binned, options.printmode) | def display(): if options.graph: output.graph(command, options.graphdir, proxy) else: output.display(command, options.binned, options.printmode) | 4,284 |
def graph(self): if self.chartdata is None: raise AttributeError, "Data not set for bar chart!" | def graph(self): if self.chartdata is None: raise AttributeError, "Data not set for bar chart!" | 4,285 |
def graph(self): if self.chartdata is None: raise AttributeError, "Data not set for bar chart!" | def graph(self): if self.chartdata is None: raise AttributeError, "Data not set for bar chart!" | 4,286 |
def system(): if not system.dir: try: path = env['M5_PATH'].split(':') except KeyError: path = [ '/dist/m5/system', '/n/poolfs/z/dist/m5/system' ] for system.dir in path: if os.path.isdir(system.dir): break else: raise ImportError, "Can't find a path to system files." if not binary.dir: binary.dir = joinpath(system.d... | def system(): if not system.dir: try: path = env['M5_PATH'].split(':') except KeyError: path = [ '/dist/m5/system', '/n/poolfs/z/dist/m5/system' ] for system.dir in path: if os.path.isdir(system.dir): break else: raise ImportError, "Can't find a path to system files." if not binary.dir: binary.dir = joinpath(system.d... | 4,287 |
def main(): import cc_main parse_args() done = False if options.copyright: done = True print info.LICENSE print if options.authors: done = True print 'Author information:' print print info.AUTHORS print if options.readme: done = True print 'Readme:' print print info.README print if options.release_notes: done = Tr... | def main(): import cc_main parse_args() done = False if options.copyright: done = True print info.LICENSE print if options.authors: done = True print 'Author information:' print print info.AUTHORS print if options.readme: done = True print 'Readme:' print print info.README print if options.release_notes: done = Tr... | 4,288 |
def commands(options, command, args): if command == 'database': if len(args) == 0: raise CommandException import dbinit mydb = dbinit.MyDB(options) if args[0] == 'drop': if len(args) > 2: raise CommandException mydb.admin() mydb.drop() if len(args) == 2 and args[1] == 'init': mydb.create() mydb.connect() mydb.populat... | def commands(options, command, args): if command == 'database': if len(args) == 0: raise CommandException import dbinit mydb = dbinit.MyDB(options) if args[0] == 'drop': if len(args) > 2: raise CommandException mydb.admin() mydb.drop() if len(args) == 2 and args[1] == 'init': mydb.create() mydb.connect() mydb.populat... | 4,289 |
def isproxy(obj): if isinstance(obj, BaseProxy): return True elif isinstance(obj, (list, tuple)): for v in obj: if isproxy(v): return True return False | def isproxy(obj): if isinstance(obj, (BaseProxy, EthernetAddr)): return True elif isinstance(obj, (list, tuple)): for v in obj: if isproxy(v): return True return False | 4,290 |
def IncEthernetAddr(addr, val = 1): bytes = map(lambda x: int(x, 16), addr.split(':')) bytes[5] += val for i in (5, 4, 3, 2, 1): val,rem = divmod(bytes[i], 256) bytes[i] = rem if val == 0: break bytes[i - 1] += val assert(bytes[0] <= 255) return ':'.join(map(lambda x: '%02x' % x, bytes)) | def IncEthernetAddr(addr, val = 1): bytes = map(lambda x: int(x, 16), addr.split(':')) bytes[5] += val for i in (5, 4, 3, 2, 1): val,rem = divmod(bytes[i], 256) bytes[i] = rem if val == 0: break bytes[i - 1] += val assert(bytes[0] <= 255) return ':'.join(map(lambda x: '%02x' % x, bytes)) | 4,291 |
def __init__(self, inc = 1): self.value = self.addr self.addr = IncEthernetAddr(self.addr, inc) | def __init__(self, inc = 1): self.value = self.addr self.addr = IncEthernetAddr(self.addr, inc) | 4,292 |
def __str__(self): if self.value == NextEthernetAddr: self.value = self.value().value return self.value | def __str__(self): if self.value == NextEthernetAddr: self.value = self.value().value return self.value | 4,293 |
def unproxy(self,base): return self | def unproxy(self, base): return self | 4,294 |
def finalize(self): self.flags = self.getFlags() self.constructor = self.makeConstructor() self.op_decl = self.makeDecl() | def finalize(self): self.flags = self.getFlags() self.constructor = self.makeConstructor() self.op_decl = self.makeDecl() | 4,295 |
def outputDot(self, dot): | def outputDot(self, dot): | 4,296 |
def __setattr__(self, attr, value): if attr != 'ptype': raise AttributeError, \ 'Attribute %s not available in %s' % (attr, self.__class__) super(ParamFactory, self).__setattr__(attr, value) | def__setattr__(self,attr,value):ifattr!='ptype':raiseAttributeError,\'Attribute%snotavailablein%s'%(attr,self.__class__)super(ParamFactory,self).__setattr__(attr,value) | 4,297 |
def _string(cls, value): return value | def_string(cls,value):returnvalue | 4,298 |
def _string(): return 'NULL' | def_string():return'NULL' | 4,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.