rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
if name_re.match(headers[i]) >= 0: k, v = name_re.group(1,2) | ts_results = name_re.match_group(headers[i], (1,2)) if ts_results: k, v = ts_results[1] | def decapitate(html, RESPONSE=None, header_re=regex.compile( '\(\(' '[^\n\0\- <>:]+:[^\n]*\n' '\|' '[ \t]+[^\0\- ][^\n]*\n' '\)+\)[ \t]*\n\([\0-\377]+\)' ), space_re=regex.compile('\([ \t]+\)'), name_re=regex.compile('\([^\0\- <>:]+\):\([^\n]*\)'), ): if header_re.match(html) < 0: return html headers, html = header_re.... | fb76d2fc46a3786951890b362b197fc303527dc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fb76d2fc46a3786951890b362b197fc303527dc3/DTMLMethod.py |
for key, value in default_stop_words: | for key, value in default_stop_words.items(): | def __init__(self, index_dictionary = None, synstop = None): 'Create an inverted index' if (synstop is None): synstop = {} for key, value in default_stop_words: synstop[key] = value self.synstop = synstop | 808bcf50b7ef9713ece5d5d224b4f5d77c009e62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/808bcf50b7ef9713ece5d5d224b4f5d77c009e62/InvertedIndex.py |
try: v,expires,domain,path,secure=self.cookies[name] except: v,expires,domain,path,secure='','','','','' self.cookies[name]=v+value,expires,domain,path,secure | self.setCookie(name,value) | def appendCookie(self, name, value): | b848b28c6e7efd6f3933bba219f4532ebd6acb2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b848b28c6e7efd6f3933bba219f4532ebd6acb2a/Response.py |
self.cookies[name]='deleted','01-Jan-96 11:11:11 GMT','','','' def setCookie(self,name, value=None, expires=None, domain=None, path=None, secure=None): | self.setCookie(name,'deleted', max_age=0) def setCookie(self,name,value,**kw): | def expireCookie(self, name): | b848b28c6e7efd6f3933bba219f4532ebd6acb2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b848b28c6e7efd6f3933bba219f4532ebd6acb2a/Response.py |
except: cookie=('')*5 def f(a,b): if b is not None: return b return a self.cookies[name]=tuple(map(f,cookie, (value,expires,domain,path,secure) ) ) | except: cookie=self.cookies[name]={} for k, v in kw.items(): cookie[k]=v cookie['value']=value | def setCookie(self,name, value=None, | b848b28c6e7efd6f3933bba219f4532ebd6acb2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b848b28c6e7efd6f3933bba219f4532ebd6acb2a/Response.py |
for name in self.cookies.keys(): value,expires,domain,path,secure=self.cookies[name] cookie='set-cookie: %s=%s' % (name,value) if expires: cookie = "%s; expires=%s" % (cookie,expires) if domain: cookie = "%s; domain=%s" % (cookie,domain) if path: cookie = "%s; path=%s" % (cookie,path) if secure: cookie = cookie+'; secu... | for name, attrs in self.cookies.items(): if attrs.has_key('expires'): cookie='set-cookie: %s="%s"' % (name,attrs['value']) else: cookie=('set-cookie: %s="%s"; Version="1"' % (name,attrs['value'])) for name, v in attrs.items(): if name=='expires': cookie = '%s; Expires="%s"' % (cookie,v) elif name=='domain': cookie = '%... | def _cookie_list(self): | b848b28c6e7efd6f3933bba219f4532ebd6acb2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b848b28c6e7efd6f3933bba219f4532ebd6acb2a/Response.py |
REQUEST['RESPONSE'].setCookie('cp_', 'deleted', | REQUEST['RESPONSE'].setCookie('__cp', 'deleted', | 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_... | d1f4d07cb3ad5a4eb1aa37f53d31e85f6102dead /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d1f4d07cb3ad5a4eb1aa37f53d31e85f6102dead/CopySupport.py |
tnamelast='' | tnamelast=None | def _read_and_report(file, rpt=None, fromEnd=0, both=0, n=99999999, show=0): """\ Read a file's index up to the given time. """ first=1 seek=file.seek read=file.read unpack=struct.unpack split=string.split join=string.join find=string.find seek(0,2) file_size=file.tell() gmtime=time.gmtime if fromEnd: pos=file_size el... | 5c2fc149f484948db9f8f76b12ee185450241da3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/5c2fc149f484948db9f8f76b12ee185450241da3/bbb.py |
if __name__=='__main__': | def main(argv): | def xmls(pos, oid, start, tname, user, t, p, first, newtrans): write=sys.stdout.write if first: write('<?xml version="1.0">\n<transactions>\n') if pos is None: write('</transaction>\n') write('</transactioons>\n') return if newtrans: if pos > 9: write('</transaction>\n') write('<transaction name="%s" user="%s">\n%s\n... | 5c2fc149f484948db9f8f76b12ee185450241da3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/5c2fc149f484948db9f8f76b12ee185450241da3/bbb.py |
opts, args = getopt.getopt(sys.argv[1:],'r:ebl:s:f:p:') | opts, args = getopt.getopt(argv,'r:ebl:s:f:p:') | def xmls(pos, oid, start, tname, user, t, p, first, newtrans): write=sys.stdout.write if first: write('<?xml version="1.0">\n<transactions>\n') if pos is None: write('</transaction>\n') write('</transactioons>\n') return if newtrans: if pos > 9: write('</transaction>\n') write('<transaction name="%s" user="%s">\n%s\n... | 5c2fc149f484948db9f8f76b12ee185450241da3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/5c2fc149f484948db9f8f76b12ee185450241da3/bbb.py |
print s | def doc_underline(self, s, expr=re.compile("_([%s0-9\s\.,\?\/]+)_" % letters).search): | b96890a7acf64d38af9140fbb7265781e506fd56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b96890a7acf64d38af9140fbb7265781e506fd56/ClassicDocumentClass.py | |
print "got it" | def doc_underline(self, s, expr=re.compile("_([%s0-9\s\.,\?\/]+)_" % letters).search): | b96890a7acf64d38af9140fbb7265781e506fd56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b96890a7acf64d38af9140fbb7265781e506fd56/ClassicDocumentClass.py | |
_DQUOTEDTEXT = r'("[%s0-9\n%s]+")' % (letters,punctuation) _URL_AND_PUNC = r'([%s0-9_\@%s]+)' % (letters,punctuation) | _DQUOTEDTEXT = r'("[%s0-9\n%s]+")' % (letters,punctuations) _URL_AND_PUNC = r'([%s0-9_\@%s]+)' % (letters,punctuations) | def doc_strong(self, s, expr = re.compile(r'\s*\*\*([ \n%s0-9]+)\*\*' % lettpunc).search ): | 582b08cc3dba4da5280e69ac89434ff58cc61c01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/582b08cc3dba4da5280e69ac89434ff58cc61c01/DocumentClass.py |
self.close_to_level(close_to) | self.close_to_level(close_to) | def finish_starttag(self, tag, attrs): self.scan_xmlns(attrs) if tag in EMPTY_HTML_TAGS: self.pop_xmlns() elif BLOCK_CLOSING_TAG_MAP.has_key(tag): blocks_to_close = BLOCK_CLOSING_TAG_MAP[tag] close_to = -1 for i in range(len(self.tagstack)): t = self.tagstack[i] if t in blocks_to_close: close_to = i elif t in BLOCK_LEV... | 7ce1e3d6666b65f2fea1355c4aeba689909a5fbb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/7ce1e3d6666b65f2fea1355c4aeba689909a5fbb/HTMLTALParser.py |
self.getFunction() | self.getFunction(1) | def manage_edit(self, title, module, function, REQUEST=None): | f3deac933fcbf876c6f7f04d0919ef215679b5f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f3deac933fcbf876c6f7f04d0919ef215679b5f2/ExternalMethod.py |
def getFunction(self): | def getFunction(self, check=0): | def getFunction(self): | f3deac933fcbf876c6f7f04d0919ef215679b5f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f3deac933fcbf876c6f7f04d0919ef215679b5f2/ExternalMethod.py |
if self.func_defaults != ff.func_defaults: self.func_defaults = ff.func_defaults func_code=FuncCode(ff,f is not ff) if func_code != self.func_code: self.func_code=func_code | func_code=FuncCode(ff,f is not ff) if func_code != self.func_code: self.func_code=func_code | def getFunction(self): | f3deac933fcbf876c6f7f04d0919ef215679b5f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f3deac933fcbf876c6f7f04d0919ef215679b5f2/ExternalMethod.py |
(othr.co_argcount, othr.co_varnames)) | (other.co_argcount, other.co_varnames)) | def __cmp__(self,other): | f3deac933fcbf876c6f7f04d0919ef215679b5f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f3deac933fcbf876c6f7f04d0919ef215679b5f2/ExternalMethod.py |
self.handlers = [] for tname,nargs,nsection in blocks[1:]: for errname in string.split(nargs): self.handlers.append((errname,nsection.blocks)) if string.strip(nargs)=='': self.handlers.append(('',nsection.blocks)) | if len(blocks) == 2 and blocks[1][0] == 'finally': self.finallyBlock = blocks[1][2].blocks else: self.handlers = [] defaultHandlerFound = 0 for tname,nargs,nsection in blocks[1:]: if tname == 'else': if not self.elseBlock is None: raise ParseError, ( 'No more than one else block is allowed', self.name) self.else... | def __init__(self, blocks): tname, args, section = blocks[0] | 31fa25934723409f711a48aa17aabe6f8683e0b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/31fa25934723409f711a48aa17aabe6f8683e0b2/DT_Try.py |
return render_blocks(self.section, md) | result = render_blocks(self.section, md) | def render(self, md): # first we try to render the first block try: return render_blocks(self.section, md) except DTReturn: raise except: # but an error occurs.. save the info. t,v = sys.exc_info()[:2] if type(t)==type(''): errname = t else: errname = t.__name__ | 31fa25934723409f711a48aa17aabe6f8683e0b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/31fa25934723409f711a48aa17aabe6f8683e0b2/DT_Try.py |
else: if (self.elseBlock is None): return result else: return result + render_blocks(self.elseBlock, md) def render_try_finally(self, md): result = '' try: result = render_blocks(self.section, md) finally: result = result + render_blocks(self.finallyBlock, md) return result | def render(self, md): # first we try to render the first block try: return render_blocks(self.section, md) except DTReturn: raise except: # but an error occurs.. save the info. t,v = sys.exc_info()[:2] if type(t)==type(''): errname = t else: errname = t.__name__ | 31fa25934723409f711a48aa17aabe6f8683e0b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/31fa25934723409f711a48aa17aabe6f8683e0b2/DT_Try.py | |
(item.filename is not None or 'content-type' in map(lower, item.headers.keys()))): | (item.filename is not None )): | def processInputs( self, # "static" variables that we want to be local for speed SEQUENCE=1, DEFAULT=2, RECORD=4, RECORDS=8, REC=12, # RECORD|RECORDS EMPTY=16, CONVERTED=32, hasattr=hasattr, getattr=getattr, setattr=setattr, search_type=regex.compile(':[a-zA-Z][a-zA-Z0-9_]+$').search, rfind=string.rfind, ): """Process ... | 299b1d045e1330809215ab279ff73141bb552d2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/299b1d045e1330809215ab279ff73141bb552d2c/HTTPRequest.py |
fields=self._class(fields, self._parent) | parent=self._parent fields=self._class(fields, parent) | def __getitem__(self,index): | 478a3492410024408bfd74a56aa30dd2ef8ce461 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/478a3492410024408bfd74a56aa30dd2ef8ce461/RDB.py |
return fields | if parent is None: return fields return fields.__of__(parent) | def __getitem__(self,index): | 478a3492410024408bfd74a56aa30dd2ef8ce461 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/478a3492410024408bfd74a56aa30dd2ef8ce461/RDB.py |
ob=self._p_jar.importFile(file) | connection=self._p_jar obj=self while connection is None: obj=obj.aq_parent connection=obj._p_jar ob=connection.importFile(file) | def manage_importObject(self, file, REQUEST=None): """Import an object from a file""" dirname, file=os.path.split(file) if dirname: raise 'Bad Request', 'Invalid file name %s' % file file=os.path.join(INSTANCE_HOME, 'import', file) if not os.path.exists(file): raise 'Bad Request', 'File does not exist: %s' % file ob=se... | 790e51fa360986ee9f6c15de5d1d619a0217f3c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/790e51fa360986ee9f6c15de5d1d619a0217f3c1/ObjectManager.py |
if isop(q[i]): q[i] = operator_dict[q[i]] | if type(q[i]) is not ListType and isop(q[i]): q[i] = operator_dict[q[i]] | def parse2(q, default_operator, operator_dict = {AndNot: AndNot, And: And, Or: Or, Near: Near}, ListType=type([]), ): '''Find operators and operands''' i = 0 isop=operator_dict.has_key while (i < len(q)): if (type(q[i]) is ListType): q[i] = parse2(q[i], default_operator) # every other item, starting with the first, sh... | 6b44ca6407736f096766614622c12fdd49aad3e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6b44ca6407736f096766614622c12fdd49aad3e0/TextIndex.py |
REQUEST.RESPONSE.notFoundError("%s\n%s" % (name, method)) | try: REQUEST.RESPONSE.notFoundError("%s\n%s" % (name, method)) except AttributeError: raise KeyError, name | def __bobo_traverse__(self, REQUEST, name=None): | b24bde6d5d478789e9755bb4b6610b32bb1836fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b24bde6d5d478789e9755bb4b6610b32bb1836fa/Application.py |
self._init() | self._index=BTree() | def clear(self): | 347aaba193be951fa11c8f08c99c4bb82a2602d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/347aaba193be951fa11c8f08c99c4bb82a2602d3/Index.py |
ts=os.stat(self.filepath()) if not hasattr(self, '_v_last_read') or \ (ts != self._v_last_read): | ts=os.stat(self.filepath())[stat.ST_MTIME] if (not hasattr(self, '_v_last_read') or (ts != self._v_last_read)): | def __call__(self, *args, **kw): """Call an ExternalMethod | b3a205237a9bbe231928cebefe9714c01f686a05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b3a205237a9bbe231928cebefe9714c01f686a05/ExternalMethod.py |
class Foo(Acquisition.Implicit): pass | class DummyAqImplicit(Acquisition.Implicit): pass class DummyPersistent(Persistent): pass | def _delDB(): transaction.abort() del stuff['db'] | 44e868278dfec6033461bcf0a7760fb97ddda7e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/44e868278dfec6033461bcf0a7760fb97ddda7e2/testSessionDataManager.py |
def testSubcommit(self): sd = self.app.session_data_manager.getSessionData() sd.set('foo', 'bar') | def testSubcommitAssignsPJar(self): sd = self.app.session_data_manager.getSessionData() dummy = DummyPersistent() sd.set('dp', dummy) self.failUnless(sd['dp']._p_jar is None) | def testSubcommit(self): sd = self.app.session_data_manager.getSessionData() sd.set('foo', 'bar') # TODO: this is used to test that transaction.commit(1) returned # None, but transaction.commit(whatever) always returns None (unless # there's an exception). What is this really trying to test? transaction.savepoint(opti... | 44e868278dfec6033461bcf0a7760fb97ddda7e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/44e868278dfec6033461bcf0a7760fb97ddda7e2/testSessionDataManager.py |
a = Foo() b = Foo() | a = DummyAqImplicit() b = DummyAqImplicit() | def testAqWrappedObjectsFail(self): a = Foo() b = Foo() aq_wrapped = a.__of__(b) sd = self.app.session_data_manager.getSessionData() sd.set('foo', aq_wrapped) self.assertRaises(TypeError, transaction.commit) | 44e868278dfec6033461bcf0a7760fb97ddda7e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/44e868278dfec6033461bcf0a7760fb97ddda7e2/testSessionDataManager.py |
that interacts correctly with objects requiring.""" | that interacts correctly with objects providing OFS.interfaces.ITraversable. """ | def boboTraverseAwareSimpleTraverse(object, path_items, econtext): """A slightly modified version of zope.tales.expressions.simpleTraverse that interacts correctly with objects requiring.""" request = getattr(econtext, 'request', None) path_items = list(path_items) path_items.reverse() while path_items: name = path_it... | 5990331e8c0a5b89e0c1c568882a6a35a0e85041 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/5990331e8c0a5b89e0c1c568882a6a35a0e85041/Expressions.py |
'import Zope2; app=Zope2.app();' 'app.acl_users._doAddUser(\'%s\', \'%s\', [\'Manager\'], []);' 'transaction.commit()' | 'import Zope2; ' 'app = Zope2.app(); ' 'app.acl_users._doAddUser(\'%s\', \'%s\', [\'Manager\'], []); ' 'import transaction; ' 'transaction.commit(); ' | def do_adduser(self, arg): try: name, password = arg.split() except: print "usage: adduser <name> <password>" return cmdline = self.get_startup_cmd( self.options.python , 'import Zope2; app=Zope2.app();' 'app.acl_users._doAddUser(\'%s\', \'%s\', [\'Manager\'], []);' 'transaction.commit()' ) % (name, password) os.system... | f40df82ee2678011037a0d948284f040659f48f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f40df82ee2678011037a0d948284f040659f48f9/zopectl.py |
result = self._lexicon.get(pattern, ()) | result = self._lexicon.get(pattern, None) if result is None: return () | def get(self, pattern): """ Query the lexicon for words matching a pattern.""" wc_set = [self.multi_wc, self.single_wc] | da00c76bbd7276b3729118efb0a0fb8955a42570 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/da00c76bbd7276b3729118efb0a0fb8955a42570/GlobbingLexicon.py |
if object.aq_inContextOf(context, 1): return 1 | return object.aq_inContextOf(context, 1) | def _check_context(self, object): # Check that 'object' exists in the acquisition context of # the parent of the acl_users object containing this user, # to prevent "stealing" access through acquisition tricks. # Return true if in context, false if not or if context # cannot be determined (object is not wrapped). paren... | cf86a7c5b26bfbf8d9a2cd3e3a41c52df5b56e51 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/cf86a7c5b26bfbf8d9a2cd3e3a41c52df5b56e51/User.py |
elif kw.kas_key('sort_order'): | elif kw.has_key('sort_order'): | def searchResults(self, REQUEST=None, used=None, query_map={ type(regex.compile('')): Query.Regex, type([]): orify, type(''): Query.String, }, **kw): | 61d145aa87f518a89cc4d98e28b2b5f92806e126 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/61d145aa87f518a89cc4d98e28b2b5f92806e126/Catalog.py |
if not xhas(id): result[id] = xdict[id]+score | if not xhas(id): result[id] = score | def and_not(self, x): result = {} dict = self._dict xdict = x._dict xhas = xdict.has_key for id, score in dict.items(): if not xhas(id): result[id] = xdict[id]+score return self.__class__(result, self._words, self._index) | 4d84ff6dc04d5ce1ba0e80b1d8444eeda86e4367 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4d84ff6dc04d5ce1ba0e80b1d8444eeda86e4367/ResultList.py |
parents=[] | request['PARENTS']=parents=[] | def publish(self, module_name, after_list, published='web_objects', | ce36b9e307df69ea62df6d1e120ffd941cc06920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ce36b9e307df69ea62df6d1e120ffd941cc06920/Publish.py |
else: if (entry_name=='manage' or entry_name[:7]=='manage_'): roles='manage', | def publish(self, module_name, after_list, published='web_objects', | ce36b9e307df69ea62df6d1e120ffd941cc06920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ce36b9e307df69ea62df6d1e120ffd941cc06920/Publish.py | |
parents.append(object) | def publish(self, module_name, after_list, published='web_objects', | ce36b9e307df69ea62df6d1e120ffd941cc06920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ce36b9e307df69ea62df6d1e120ffd941cc06920/Publish.py | |
for i in range(last_parent_index): if hasattr(parents[i],'__allow_groups__'): groups=parents[i].__allow_groups__ else: continue | if hasattr(object, '__allow_groups__'): groups=object.__allow_groups__ inext=0 else: inext=None for i in range(last_parent_index): if hasattr(parents[i],'__allow_groups__'): groups=parents[i].__allow_groups__ inext=i+1 break if inext is not None: i=inext | def publish(self, module_name, after_list, published='web_objects', | ce36b9e307df69ea62df6d1e120ffd941cc06920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ce36b9e307df69ea62df6d1e120ffd941cc06920/Publish.py |
if groups is None: break auth=self.HTTP_AUTHORIZATION | if groups is None: roles=None auth='' | def publish(self, module_name, after_list, published='web_objects', | ce36b9e307df69ea62df6d1e120ffd941cc06920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ce36b9e307df69ea62df6d1e120ffd941cc06920/Publish.py |
break | def publish(self, module_name, after_list, published='web_objects', | ce36b9e307df69ea62df6d1e120ffd941cc06920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ce36b9e307df69ea62df6d1e120ffd941cc06920/Publish.py | |
del parents[0] | def publish(self, module_name, after_list, published='web_objects', | ce36b9e307df69ea62df6d1e120ffd941cc06920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ce36b9e307df69ea62df6d1e120ffd941cc06920/Publish.py | |
if parents: selfarg=parents[0] for i in range(len(parents)): parent=parents[i] if hasattr(parent,'aq_self'): p=parent.aq_self parents[i]=p request['PARENTS']=parents | def publish(self, module_name, after_list, published='web_objects', | ce36b9e307df69ea62df6d1e120ffd941cc06920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ce36b9e307df69ea62df6d1e120ffd941cc06920/Publish.py | |
if argument_name=='self': args.append(selfarg) elif name_index < nrequired: self.badRequestError(argument_name) else: args.append(defaults[name_index-nrequired]) else: args.append(v) if debug: result=self.call_object(object,tuple(args)) else: result=apply(object,tuple(args)) | if argument_name=='self': args.append(parents[0]) elif name_index < nrequired: self.badRequestError(argument_name) else: args.append(defaults[name_index-nrequired]) else: args.append(v) args=tuple(args) if debug: result=self.call_object(object,args) else: result=apply(object,args) | def publish(self, module_name, after_list, published='web_objects', | ce36b9e307df69ea62df6d1e120ffd941cc06920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ce36b9e307df69ea62df6d1e120ffd941cc06920/Publish.py |
def field2tuple(v): if type(v) is not ListType: v=(v,) return tuple(v) | ce36b9e307df69ea62df6d1e120ffd941cc06920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ce36b9e307df69ea62df6d1e120ffd941cc06920/Publish.py | ||
str(self,'other'),str(self,'environ')) | str(self,'form'),str(self,'environ')) | def str(self,name): dict=getattr(self,name) return "%s:\n\t%s\n\n" % ( name, join( map(lambda k, d=dict: "%s: %s" % (k, `d[k]`), dict.keys()), "\n\t" ) ) | ce36b9e307df69ea62df6d1e120ffd941cc06920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ce36b9e307df69ea62df6d1e120ffd941cc06920/Publish.py |
if lower(HTTP_AUTHORIZATION[:6]) != 'basic ': return None | if lower(HTTP_AUTHORIZATION[:6]) != 'basic ': if roles is None: return '' return None | def old_validation(groups, HTTP_AUTHORIZATION, roles=UNSPECIFIED_ROLES): global base64 if base64 is None: import base64 if lower(HTTP_AUTHORIZATION[:6]) != 'basic ': return None [name,password] = string.splitfields( base64.decodestring( split(HTTP_AUTHORIZATION)[-1]), ':') if roles is None: return name keys=None try... | ce36b9e307df69ea62df6d1e120ffd941cc06920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ce36b9e307df69ea62df6d1e120ffd941cc06920/Publish.py |
if find('\\') < 0 or (find('\\t') < 0 and find('\\n') < 0): return s | if find(s,'\\') < 0 or (find(s,'\\t') < 0 and find(s,'\\n') < 0): return s | def parse_text(s): if find('\\') < 0 or (find('\\t') < 0 and find('\\n') < 0): return s r=[] for x in split(s,'\\\\'): x=join(split(x,'\\n'),'\n') r.append(join(split(x,'\\t'),'\t')) return join(r,'\\') | ee6ee1707af8d7ac83fd98ddcb0b72135aee1ab2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ee6ee1707af8d7ac83fd98ddcb0b72135aee1ab2/RDB.py |
except: doc=getattr(subobject, entry_name+'__doc__') | except: doc=getattr(object, entry_name+'__doc__') | def publish(self, module_name, after_list, published='web_objects', | a6863194e242f53539ff23280b108ddf824f1f52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a6863194e242f53539ff23280b108ddf824f1f52/Publish.py |
try: roles=getattr(object,entry_name+'__roles__') | try: roles=getattr(object, entry_name+'__roles__') | def publish(self, module_name, after_list, published='web_objects', | a6863194e242f53539ff23280b108ddf824f1f52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a6863194e242f53539ff23280b108ddf824f1f52/Publish.py |
if len(e) > 2: | if len(e) >= 2: | def handler(self, conn): from string import split, join, atoi hdr = conn.recv(10) | e675dba1c8125ceef0a04b9adf82d0ae6143821e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e675dba1c8125ceef0a04b9adf82d0ae6143821e/pcgi_publisher.py |
env[e[0]] = e[1] | env[e[0]]='' | def handler(self, conn): from string import split, join, atoi hdr = conn.recv(10) | e675dba1c8125ceef0a04b9adf82d0ae6143821e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e675dba1c8125ceef0a04b9adf82d0ae6143821e/pcgi_publisher.py |
try: try: doc=subobject.__doc__ except: doc=getattr(object, entry_name+'__doc__') if not doc: raise AttributeError, entry_name except: if debug_mode: return response.debugError( "Missing doc string at: %s" % URL) else: return response.notFoundError("%s" % URL) | doc = getattr(subobject, '__doc__', None) if doc is None: doc = getattr(object, '%s__doc__' % entry_name, None) if not doc: return response.debugError( "The object at %s has an empty or missing " \ "docstring. Objects must have a docstring to be " \ "published." % URL ) | def traverse(self, path, response=None, validated_hook=None): """Traverse the object space | b25b7dde1e1b8f984daf0e8d9f80cb3d6ad5e7c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b25b7dde1e1b8f984daf0e8d9f80cb3d6ad5e7c8/BaseRequest.py |
del cache[q] | if int(cache[q][0]) == key: del cache[q] | def _cached_result(self, DB__, query): | 174faef1fd8f065a4f5921aace080d3f58306d85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/174faef1fd8f065a4f5921aace080d3f58306d85/DA.py |
module=__import__(module_name) | module=__import__(module_name, globals(), globals(), ('__doc__',)) | def get_module_info(module_name, modules={}, acquire=_l.acquire, release=_l.release, ): if modules.has_key(module_name): return modules[module_name] if module_name[-4:]=='.cgi': module_name=module_name[:-4] acquire() tb=None try: try: module=__import__(module_name) realm=module_name # Let the app specify a realm i... | b484df1968e5cb909db6791011fa46985d3a95e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b484df1968e5cb909db6791011fa46985d3a95e8/Publish.py |
currentindet = indent | currentindent = indent | def StructuredText(paragraphs, delimiter=re.compile(para_delim)): """ StructuredText accepts paragraphs, which is a list of lines to be parsed. StructuredText creates a structure which mimics the structure of the paragraphs. Structure => [paragraph,[sub-paragraphs]] """ currentlevel = 0 currentindent = 0 levels ... | 1880eb89d803f626014fe1c9609e6df12d5a4ed7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1880eb89d803f626014fe1c9609e6df12d5a4ed7/ST.py |
return self._lambdas[ 0 ]( *args, **kw ) | from zExceptions import Unauthorized allowed = self._lambdas[ 0 ]( *args, **kw ) if not allowed: raise Unauthorized return 1 | def validate( self, *args, **kw ): return self._lambdas[ 0 ]( *args, **kw ) | 75bca269d84d9dd10b7e4dc26db9f5982187b4bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/75bca269d84d9dd10b7e4dc26db9f5982187b4bb/testCopySupport.py |
def __init__(self,id,title=None): self.id=id self.title=title self._ztable=ZTablesCore.ZTable(id) | aeb8c0bccf2be057cdc2225d7e6d966e5868f97f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/aeb8c0bccf2be057cdc2225d7e6d966e5868f97f/Catalog.py | ||
schema = [('id', 'FieldIndex', 's'), ('url', 'FieldIndex', 's'), ('title', 'TextIndex', 's'), ('meta_type', 'FieldIndex', 's'), ('last_modified', 'TextIndex', 'd'), ('subject', 'TextIndex', 's'), ('description', 'TextIndex', 's'), ('date', 'TextIndex', 'd'), ('reviewed', 'FieldIndex', 'i'), | schema = [('id', 'FieldIndex', 's', None), ('url', 'FieldIndex', 's', 1), ('title', 'TextIndex', 's', None), ('meta_type', 'FieldIndex', 's', None), ('last_modified', 'TextIndex', 'd', None), ('subject', 'TextIndex', 's', None), ('description', 'TextIndex', 's', None), ('date', 'TextIndex', 'd', None), ('reviewed', 'Fi... | def __init__(self,id,title=None): self.id=id self.title=title self._ztable=ZTablesCore.ZTable(id) | aeb8c0bccf2be057cdc2225d7e6d966e5868f97f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/aeb8c0bccf2be057cdc2225d7e6d966e5868f97f/Catalog.py |
for name, index, type in schema: | call = [] for name, index, type, ci in schema: | def __init__(self,id,title=None): self.id=id self.title=title self._ztable=ZTablesCore.ZTable(id) | aeb8c0bccf2be057cdc2225d7e6d966e5868f97f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/aeb8c0bccf2be057cdc2225d7e6d966e5868f97f/Catalog.py |
self._ztable.update_database_schema(uindex, utype) | self._ztable.update_database_schema(uindex, utype, call) | def __init__(self,id,title=None): self.id=id self.title=title self._ztable=ZTablesCore.ZTable(id) | aeb8c0bccf2be057cdc2225d7e6d966e5868f97f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/aeb8c0bccf2be057cdc2225d7e6d966e5868f97f/Catalog.py |
'an object from the uid %r.' % (uid)) | 'an object from the uid %r.' % p) | def reindexIndex(self, name, REQUEST): if isinstance(name, str): name = (name,) for p in self._catalog.uids.keys(): obj = self.resolve_path(p) if not obj: obj = self.resolve_url(p, REQUEST) if obj is None: LOG.error('reindexIndex could not resolve ' 'an object from the uid %r.' % (uid)) else: # don't update metadata wh... | 3c86de134c11954192d2e6ef3b697488688b989d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3c86de134c11954192d2e6ef3b697488688b989d/ZCatalog.py |
self.notify_queue.put((key, bucket[key])) | ob = bucket.get(key, _marker) if ob is _marker: DEBUG and TLOG( 'OOBTree lied about %s keys: %s doesnt exist' % (bucket, key) ) continue self.notify_queue.put((key, ob)) | def _getCurrentBucket(self): """ Do housekeeping if necessary, then return the 'current' bucket. """ self.lock.acquire() try: # do in-place upgrade of old "ring-based" instances if # we've just upgraded from Zope 2.5.X if self._data is None: self._upgrade() | 4457f487398c0b76c1da51c10b73c64e0664e437 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4457f487398c0b76c1da51c10b73c64e0664e437/Transience.py |
value=' '.join(str(value)) | value=' '.join(map(str, value)) | def dav__allprop(self, propstat=propstat ): # DAV helper method - return one or more propstat elements # indicating property names and values for all properties. result=[] for item in self._propertyMap(): name, type=item['id'], item.get('type','string') value=self.getProperty(name) | a58f2defc265ddc390995d19353a63e64a006a29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a58f2defc265ddc390995d19353a63e64a006a29/PropertySheets.py |
value='\n'.join(str(value)) | value='\n'.join(map(str, value)) | def dav__allprop(self, propstat=propstat ): # DAV helper method - return one or more propstat elements # indicating property names and values for all properties. result=[] for item in self._propertyMap(): name, type=item['id'], item.get('type','string') value=self.getProperty(name) | a58f2defc265ddc390995d19353a63e64a006a29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a58f2defc265ddc390995d19353a63e64a006a29/PropertySheets.py |
value=' '.join(str(value)) | value=' '.join(map(str, value)) | def dav__propstat(self, name, result, propstat=propstat, propdesc=propdesc): # DAV helper method - return a propstat element indicating # property name and value for the requested property. xml_id=self.xml_namespace() propdict=self._propdict() if not propdict.has_key(name): prop='<n:%s xmlns:n="%s"/>\n' % (name, xml_id... | a58f2defc265ddc390995d19353a63e64a006a29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a58f2defc265ddc390995d19353a63e64a006a29/PropertySheets.py |
value='\n'.join(str(value)) | value='\n'.join(map(str, value)) | def dav__propstat(self, name, result, propstat=propstat, propdesc=propdesc): # DAV helper method - return a propstat element indicating # property name and value for the requested property. xml_id=self.xml_namespace() propdict=self._propdict() if not propdict.has_key(name): prop='<n:%s xmlns:n="%s"/>\n' % (name, xml_id... | a58f2defc265ddc390995d19353a63e64a006a29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a58f2defc265ddc390995d19353a63e64a006a29/PropertySheets.py |
zLOG.LOG('Z2', zLOG.BLATHER, "Reopened Z2.log") | zLOG.LOG('Z2', zLOG.BLATHER, "Reopened access log") | def sighandler(signum, frame): signame = zdaemon.Daemon.get_signal_name(signum) zLOG.LOG('Z2', zLOG.INFO , "Caught signal %s" % signame) | a99acbdc763e6b97463f1811a762f5ef21591d4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a99acbdc763e6b97463f1811a762f5ef21591d4e/z2.py |
expr = re.compile(r'\s*\*([ \na-zA-Z0-9.:/;,\'\"\?\-\_\/\=]+)\*(?!\*|-)').search | expr = re.compile(r'\s*\*([ \na-zA-Z0-9.:/;,\'\"\?\-\_\/\=\-\>\<\(\)]+)\*(?!\*|-)').search | def doc_emphasize( self, s, expr = re.compile(r'\s*\*([ \na-zA-Z0-9.:/;,\'\"\?\-\_\/\=]+)\*(?!\*|-)').search ): | 126db9fe33824bd6e72800fad74cf3bae2098110 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/126db9fe33824bd6e72800fad74cf3bae2098110/DocumentClass.py |
if _looping: apply(cb, (map,)+args, kw or {}) | if _looping: apply(callback, (map,)+args, kw or {}) | def register_loop_callback(callback, args=(), kw=None): _loop_lock.acquire() try: if _looping: apply(cb, (map,)+args, kw or {}) else: _loop_callbacks.append((callback, args, kw)) finally: _loop_lock.release() | a905d79e5a32eb8dee53f8f4cc3d2783d630eb17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a905d79e5a32eb8dee53f8f4cc3d2783d630eb17/ThreadedAsync.py |
if not line: return 0 | if not line: return 0 | def _check(self, lev='250'): line = self.getLine() if not line: return 0 #can't check an empty line, eh? try: code=string.atoi(line[:3]) except: raise smtpError, "Cannot convert line from SMTP: %s" % line | eb32197048759d7bd089b293a75659690b1329a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/eb32197048759d7bd089b293a75659690b1329a2/MailHost.py |
raise smtpError, "Cannot convert line from SMTP: %s" % line if code > 400: raise smtpError, "Recieved error code %s from SMTP: %s"\ | raise smtpError, \ "Cannot convert line from SMTP: %s" % line if code > 400: raise smtpError, \ "Recieved error code %s from SMTP: %s"\ | def _check(self, lev='250'): line = self.getLine() if not line: return 0 #can't check an empty line, eh? try: code=string.atoi(line[:3]) except: raise smtpError, "Cannot convert line from SMTP: %s" % line | eb32197048759d7bd089b293a75659690b1329a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/eb32197048759d7bd089b293a75659690b1329a2/MailHost.py |
schema = Zope.Startup.getSchema() | schema = self.schema | def load_config_text(self, text): # We have to create a directory of our own since the existence # of the directory is checked. This handles this in a # platform-independent way. schema = Zope.Startup.getSchema() sio = cStringIO.StringIO( text.replace("<<INSTANCE_HOME>>", TEMPNAME)) os.mkdir(TEMPNAME) os.mkdir(TEMPPRO... | 41b687a59aa095257ed85f08c1bca5cb20971779 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/41b687a59aa095257ed85f08c1bca5cb20971779/test_schema.py |
schema = Zope.Startup.getSchema() | schema = self.schema | def test_load_config_template(self): schema = Zope.Startup.getSchema() cfg = getConfiguration() fn = os.path.join(cfg.zopehome, "skel", "etc", "zope.conf.in") f = open(fn) text = f.read() f.close() self.load_config_text(text) | 41b687a59aa095257ed85f08c1bca5cb20971779 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/41b687a59aa095257ed85f08c1bca5cb20971779/test_schema.py |
z1 = os.environ.get('Z_DEBUG_MODE',None) z2 = os.environ.get('BOBO_DEBUG_MODE',None) | z1 = os.environ.get('Z_DEBUG_MODE','') z2 = os.environ.get('BOBO_DEBUG_MODE','') | def get_module_info(module_name, modules={}, acquire=_l.acquire, release=_l.release, ): if modules.has_key(module_name): return modules[module_name] if module_name[-4:]=='.cgi': module_name=module_name[:-4] acquire() tb=None try: try: module=__import__(module_name, globals(), globals(), ('__doc__',)) realm=module_n... | 85f887230162d1afd4761d49e76e523ce941c42f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/85f887230162d1afd4761d49e76e523ce941c42f/Publish.py |
if isinstance(file, StringType): | if not isinstance(file, StringType): | def pt_upload(self, REQUEST, file=''): """Replace the document with the text in file.""" if SUPPORTS_WEBDAV_LOCKS and self.wl_isLocked(): raise ResourceLockedError, "File is locked via WebDAV" | 36d28b31c369b24850541a96f97b3ae828aef657 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/36d28b31c369b24850541a96f97b3ae828aef657/ZopePageTemplate.py |
' ' | """Test an SQL method.""" | def manage_test(self, REQUEST): ' ' | 3b5b9c99440b1566b2c9f5eb55c6eea1d5a4847d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3b5b9c99440b1566b2c9f5eb55c6eea1d5a4847d/DA.py |
src=self(REQUEST, src__=1) | src, result=self(REQUEST, test__=1) | def manage_test(self, REQUEST): ' ' | 3b5b9c99440b1566b2c9f5eb55c6eea1d5a4847d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3b5b9c99440b1566b2c9f5eb55c6eea1d5a4847d/DA.py |
result=self(REQUEST, test__=1) | def manage_test(self, REQUEST): ' ' | 3b5b9c99440b1566b2c9f5eb55c6eea1d5a4847d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3b5b9c99440b1566b2c9f5eb55c6eea1d5a4847d/DA.py | |
if not klass._p_changed: | if not getattr(klass,'_p_changed',None): | def __setattr__(self, name, v): klass=self._k setattr(klass, name, v) if not klass._p_changed: get_transaction().register(klass) klass._p_changed=1 | 80231bc0ef06bfb43e729d47cef138e34d229d14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/80231bc0ef06bfb43e729d47cef138e34d229d14/Property.py |
if not klass._p_changed: | if not getattr(klass,'_p_changed',None): | def __delattr__(self, name): klass=self._k delattr(klass, name) if not klass._p_changed: get_transaction().register(klass) klass._p_changed=1 | 80231bc0ef06bfb43e729d47cef138e34d229d14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/80231bc0ef06bfb43e729d47cef138e34d229d14/Property.py |
'Access contents information', | def manage_setPermissionMapping(self, permission_names=[], class_permissions=[], REQUEST=None): "Change property sheet permissions" ips=self.getClassAttr('propertysheets') ips=getattr(ips, self.id) | 80231bc0ef06bfb43e729d47cef138e34d229d14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/80231bc0ef06bfb43e729d47cef138e34d229d14/Property.py | |
_Manage_properties_Permission='Manage properties' _Access_contents_information_Permission='View' | _Manage_properties_Permission='_Manage_properties_Permission' _Access_contents_information_Permission='_View_Permission' | def manage_setPermissionMapping(self, permission_names=[], class_permissions=[], REQUEST=None): "Change property sheet permissions" ips=self.getClassAttr('propertysheets') ips=getattr(ips, self.id) | 80231bc0ef06bfb43e729d47cef138e34d229d14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/80231bc0ef06bfb43e729d47cef138e34d229d14/Property.py |
if klass._p_changed==0: | if not getattr(klass, '_p_changed', 0): | def rclass(klass): if klass._p_changed==0: get_transaction().register(klass) klass._p_changed=1 | 80231bc0ef06bfb43e729d47cef138e34d229d14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/80231bc0ef06bfb43e729d47cef138e34d229d14/Property.py |
delattr(pc,id) | try: delattr(pc,id) except: pass | def _delOb(self, id): delattr(self, id) pc=self.aq_inner.aq_parent.aq_parent._zclass_propertysheets_class delattr(pc,id) pc.__propset_attrs__=tuple(map(lambda o: o['id'], self._objects)) rclass(pc) | 80231bc0ef06bfb43e729d47cef138e34d229d14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/80231bc0ef06bfb43e729d47cef138e34d229d14/Property.py |
ob.manage_afterClone(ob) | 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_... | a2f1f5a03a2f394babba46b18306743d8a396e27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a2f1f5a03a2f394babba46b18306743d8a396e27/CopySupport.py | |
if domains and not domainSpecValidate(domains): | if domains and not self.domainSpecValidate(domains): | def _changeUser(self,name,password,confirm,roles,domains,REQUEST=None): if not name: return MessageDialog( title ='Illegal value', message='A username must be specified', action ='manage_main') | 1f2355a05d3c5c5f6ff71ae120ef68f565085693 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1f2355a05d3c5c5f6ff71ae120ef68f565085693/User.py |
sys.stdout.write(os.path.basename(self.__file) + " ") | basename = os.path.basename(self.__file) sys.stdout.write(basename + " ") | def runTest(self): sys.stdout.write(os.path.basename(self.__file) + " ") sys.stdout.flush() sys.argv = ["", "-Q", self.__file] pwd = os.getcwd() try: try: os.chdir(self.__dir) runtest.main() finally: os.chdir(pwd) except SystemExit, what: if what.code: self.fail("output for %s didn't match" % self.__file) | 0667688cedfd7aabf0627d306b684ff35c7c1814 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0667688cedfd7aabf0627d306b684ff35c7c1814/test_files.py |
sys.argv = ["", "-Q", self.__file] | if basename[:10] == 'test_metal': sys.argv = ["", "-Q", "-m", self.__file] else: sys.argv = ["", "-Q", self.__file] | def runTest(self): sys.stdout.write(os.path.basename(self.__file) + " ") sys.stdout.flush() sys.argv = ["", "-Q", self.__file] pwd = os.getcwd() try: try: os.chdir(self.__dir) runtest.main() finally: os.chdir(pwd) except SystemExit, what: if what.code: self.fail("output for %s didn't match" % self.__file) | 0667688cedfd7aabf0627d306b684ff35c7c1814 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0667688cedfd7aabf0627d306b684ff35c7c1814/test_files.py |
r=_getPath(home, "Products/%s/%s/" % (p,prefix), | r=_getPath(home, "lib/python/Products/%s/%s/" % (p,prefix), | def getPath(prefix, name, checkProduct=1, suffixes=('',)): """Find a file in one of several relative locations Arguments: prefix -- The location, relative to some home, to look for the file name -- The name of the file. This must not be a path. checkProduct -- a flag indicating whether product directories should b... | b03b6ae5f46068e68e56657725742c755a916bf2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b03b6ae5f46068e68e56657725742c755a916bf2/Extensions.py |
rotor.newrotor(d+' shshsh').decrypt(open(p,'rb').read()) | rotor.newrotor(prod_id +' shshsh').decrypt(open(p,'rb').read()) | def getObject(module, name, reload=0, # The use of a mutable default is intentional here, # because modules is a module cache. modules={} ): # The use of modules here is not thread safe, however, there is # no real harm in a rece condition here. If two threads # update the cache, then one will have simply worked a li... | b03b6ae5f46068e68e56657725742c755a916bf2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b03b6ae5f46068e68e56657725742c755a916bf2/Extensions.py |
execsrc=compile(data,module,'exec') | execsrc=compile(data, module, 'exec') | def getObject(module, name, reload=0, # The use of a mutable default is intentional here, # because modules is a module cache. modules={} ): # The use of modules here is not thread safe, however, there is # no real harm in a rece condition here. If two threads # update the cache, then one will have simply worked a li... | b03b6ae5f46068e68e56657725742c755a916bf2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b03b6ae5f46068e68e56657725742c755a916bf2/Extensions.py |
e=tpValuesIds(item, branches) | e=tpValuesIds(item, branches, args) | def tpValuesIds(self, branches, args, simple_type={type(''):0, type(1):0, type(1.0):0}.has_key, ): # This should build the ids of subitems which are # expandable (non-empty). Leaves should never be # in the state - it will screw the colspan counting. r=[] idattr=args['id'] try: try: items=getattr(self, branches)() exce... | c2a6d90a13b322c1560fa68f5a69514de1d8bdfe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c2a6d90a13b322c1560fa68f5a69514de1d8bdfe/TreeTag.py |
except: pass | except: if self._p_jar.db is not Globals.Bobobase._jar.db: raise 'Version Error', ( '''You may not change the database cache age while working in a <em>version</em>''') self._cache_age=Globals.Bobobase._jar.cache.cache_age=value | def manage_cache_age(self,value,REQUEST): "set cache age" try: v=self._p_jar.getVersion() except: pass else: if v: self._vcache_age=value self._p_jar.db().setVersionCacheDeactivateAfter(value) else: self._cache_age=value self._p_jar.db().setCacheDeactivateAfter(value) return | 6d93a7b72c3e0200f057e85e4a55eac1c82d9241 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6d93a7b72c3e0200f057e85e4a55eac1c82d9241/CacheManager.py |
return if self._p_jar.db is not Globals.Bobobase._jar.db: raise 'Version Error', ( '''You may not change the database cache age while working in a <em>version</em>''') self._cache_age=Globals.Bobobase._jar.cache.cache_age=value return self.manage_CacheParameters(self,REQUEST) | return self.manage_cacheParameters(self,REQUEST) | def manage_cache_age(self,value,REQUEST): "set cache age" try: v=self._p_jar.getVersion() except: pass else: if v: self._vcache_age=value self._p_jar.db().setVersionCacheDeactivateAfter(value) else: self._cache_age=value self._p_jar.db().setCacheDeactivateAfter(value) return | 6d93a7b72c3e0200f057e85e4a55eac1c82d9241 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6d93a7b72c3e0200f057e85e4a55eac1c82d9241/CacheManager.py |
except: pass | except: if self._p_jar.db is not Globals.Bobobase._jar.db: raise 'Version Error', ( '''You may not change the database cache size while working in a <em>version</em>''') self._cache_size=Globals.Bobobase._jar.cache.cache_size=value | def manage_cache_size(self,value,REQUEST): "set cache size" try: v=self._p_jar.getVersion() except: pass else: if v: self._vcache_size=value self._p_jar.db().setVersionCacheSize(value) else: self._cache_size=value self._p_jar.db().setCacheSize(value) return | 6d93a7b72c3e0200f057e85e4a55eac1c82d9241 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6d93a7b72c3e0200f057e85e4a55eac1c82d9241/CacheManager.py |
return if self._p_jar.db is not Globals.Bobobase._jar.db: raise 'Version Error', ( '''You may not change the database cache size while working in a <em>version</em>''') self._cache_size=Globals.Bobobase._jar.cache.cache_size=value | def manage_cache_size(self,value,REQUEST): "set cache size" try: v=self._p_jar.getVersion() except: pass else: if v: self._vcache_size=value self._p_jar.db().setVersionCacheSize(value) else: self._cache_size=value self._p_jar.db().setCacheSize(value) return | 6d93a7b72c3e0200f057e85e4a55eac1c82d9241 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6d93a7b72c3e0200f057e85e4a55eac1c82d9241/CacheManager.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.