rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
if len(args) > 2 or len(args) < 2: raise TypeError, None if len(args) == 2: path_info=args[1] | if len(args) < 1 or len(args) > 2: raise TypeError, None elif len(args)==1: args=args[0],'/' path_info=args[1] | def main(): import sys, os, getopt, string global repeat_count try: optlist,args=getopt.getopt(sys.argv[1:], 'dtu:p:r:e:s') if len(args) > 2 or len(args) < 2: raise TypeError, None if len(args) == 2: path_info=args[1] except: sys.stderr.write(__doc__) sys.exit(-1) silent=profile=u=debug=timeit=None env={} for opt,val... | 21f2493d0feac27dc775cd40af3b0e0046b4d1aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/21f2493d0feac27dc775cd40af3b0e0046b4d1aa/Test.py |
menu=HTMLFile('dtml/menu', globals()) | menu=DTMLFile('dtml/menu', globals()) | def __call__(self, REQUEST=None, **kw): "Searchable interface" if REQUEST is not None: perms=[] user=REQUEST.AUTHENTICATED_USER for p in self.ac_inherited_permissions(): if user.has_permission(p[0], self): perms.append(p[0]) REQUEST.set('permissions',perms) results=[] for ph in self.helpValues(): results.append(apply(g... | ef166af0945853b34afe2276839add35f61c9d26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ef166af0945853b34afe2276839add35f61c9d26/HelpSys.py |
'\([^\0- ;,=\"]+\)=\([^\0;-=\"]*\)' | '\([^\0- ;,=\"]+\)=\([^\0- ;,\"]*\)' | def parse_cookie(text, result=None, qparmre=regex.compile( '\([\0- ]*' '\([^\0- ;,=\"]+\)="\([^"]*\)\"' '\([\0- ]*[;,]\)?[\0- ]*\)' ), parmre=regex.compile( '\([\0- ]*' '\([^\0- ;,=\"]+\)=\([^\0;-=\"]*\)' '\([\0- ]*[;,]\)?[\0- ]*\)' ), acquire=parse_cookie_lock.acquire, release=parse_cookie_lock.release, ): if result ... | c88a01d1db5c79397fd55f64ce8f69c49565c89e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c88a01d1db5c79397fd55f64ce8f69c49565c89e/Publish.py |
def parse(self, line): | def parse(self, line, _index=-1): | def parse(self, line): | 0c3148b932564478c74f0e11774fea8ace578414 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0c3148b932564478c74f0e11774fea8ace578414/RDB.py |
self._row=line=self._Record(self.parse(line), self._schema, self._names) | self._row=line=self._Record( self.parse(line,_index), self._schema, self._names) | def __getitem__(self,input_index): | 0c3148b932564478c74f0e11774fea8ace578414 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0c3148b932564478c74f0e11774fea8ace578414/RDB.py |
return self._Record(self.parse(file.readline()), self._schema, self._names) | return self._Record( self.parse(file.readline(), index), self._schema, self._names) | def __getitem__(self,input_index): | 0c3148b932564478c74f0e11774fea8ace578414 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0c3148b932564478c74f0e11774fea8ace578414/RDB.py |
f.write(START_SCRIPT % (varname, varname, sys.executable, varname)) | f.write(START_SCRIPT % sys.executable) | def sh(home, user, group): start=os.path.join(home, 'start') if not os.path.exists(start): print '-'*78 print 'Creating start script, start' f = open(start,'w') f.write(START_SCRIPT % (varname, varname, sys.executable, varname)) ch(start,user,group,0711) f.close() stop=os.path.join(home, 'stop') if not os.path.exists(... | ebf0d1116c36c5d2a1b438cb4b69eb7a173e4536 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ebf0d1116c36c5d2a1b438cb4b69eb7a173e4536/make_start.py |
%s=`cd $reldir; pwd` export %s exec %s $%s/z2.py -D "$@" | exec %s $cwd/z2.py -D "$@" | def sh(home, user, group): start=os.path.join(home, 'start') if not os.path.exists(start): print '-'*78 print 'Creating start script, start' f = open(start,'w') f.write(START_SCRIPT % (varname, varname, sys.executable, varname)) ch(start,user,group,0711) f.close() stop=os.path.join(home, 'stop') if not os.path.exists(... | ebf0d1116c36c5d2a1b438cb4b69eb7a173e4536 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ebf0d1116c36c5d2a1b438cb4b69eb7a173e4536/make_start.py |
if (options[i].has_key('help') and options[i]['help'] != helps[i]) or \ (not options[i].has_key('help') and helps[i]): | if options[i].get('help') != (self.zclass_productid(), helps[i]): | def manage_edit(self, actions=[], helps=[], REQUEST=None): "Change view actions" options=self.data() changed=0 if len(actions)!=len(options): raise 'Bad Request', 'wrong number of actions' | 8cc5fa69428d4423d1da1eccfb017541541e161e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8cc5fa69428d4423d1da1eccfb017541541e161e/Basic.py |
else: | changed=1 elif options[i].has_key('help'): | def manage_edit(self, actions=[], helps=[], REQUEST=None): "Change view actions" options=self.data() changed=0 if len(actions)!=len(options): raise 'Bad Request', 'wrong number of actions' | 8cc5fa69428d4423d1da1eccfb017541541e161e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8cc5fa69428d4423d1da1eccfb017541541e161e/Basic.py |
if name[:3]=='aq_' and name != 'aq_parent' and name != 'aq_explicit': return 0 | try: if (name[:3]=='aq_' and name != 'aq_parent' and name != 'aq_explicit'): return 0 except: pass | def oldvalidate(self, inst, parent, name, value, md): ################################################################# # Note that this method is not used normally. It is simply a # Python rendition of the validate method implemented in # DocumentTemplate.cDocumentTemplate. The Python version # serves the role of a r... | 74c40c12365a39d276399aae95125d3298545609 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/74c40c12365a39d276399aae95125d3298545609/DTMLMethod.py |
"The specified module, <em>%s</em>, couldn't be found.") | "The specified module, <em>%s</em>, couldn't be found." % module) | def getObject(module, name, reload=0, modules={}): if modules.has_key(module): old=modules[module] if old.has_key(name) and not reload: return old[name] else: old=None if module[-3:]=='.py': p=module[:-3] elif module[-4:]=='.pyp': p=module[:-4] else: p=module p=getPath('Extensions', p, suffixes=('','py','pyp')) if p ... | ea575773b8f966d1c47accad3812a46a8272e2d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ea575773b8f966d1c47accad3812a46a8272e2d8/Extensions.py |
for k, v in list(index.items()): | if DEBUG: TLOG('building list of index items') l = list(index.items()) if DEBUG: TLOG('done building list of index items, now iterating over them') tmp = [] for k, v in l: | def _clean(self, b, index): for k, v in list(index.items()): if v is b: self.notifyDestruct(index[k][k]) del index[k] b.clear() | f3b4033d4651d19e7ab44268210ea248467e6748 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f3b4033d4651d19e7ab44268210ea248467e6748/Transience.py |
multiple=1, optional=1) | multiple=1, optional=1, op=None) | def __init__(self, args): args = parse_params(args, name='', type=None, column=None, multiple=1, optional=1) self.__name__ = name_param(args,'sqlvar') has_key=args.has_key if not has_key('type'): raise ParseError, ('the type attribute is required', 'dtvar') self.type=t=args['type'] if not valid_type(t): raise ParseErro... | 0541c073b7361c4fdc0a9f187771941cea3015fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0541c073b7361c4fdc0a9f187771941cea3015fd/sqltest.py |
raise ParseError, ('the type attribute is required', 'dtvar') | raise ParseError, ('the type attribute is required', 'sqltest') | def __init__(self, args): args = parse_params(args, name='', type=None, column=None, multiple=1, optional=1) self.__name__ = name_param(args,'sqlvar') has_key=args.has_key if not has_key('type'): raise ParseError, ('the type attribute is required', 'dtvar') self.type=t=args['type'] if not valid_type(t): raise ParseErro... | 0541c073b7361c4fdc0a9f187771941cea3015fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0541c073b7361c4fdc0a9f187771941cea3015fd/sqltest.py |
raise ParseError, ('invalid type, %s' % t, 'dtvar') | raise ParseError, ('invalid type, %s' % t, 'sqltest') | def __init__(self, args): args = parse_params(args, name='', type=None, column=None, multiple=1, optional=1) self.__name__ = name_param(args,'sqlvar') has_key=args.has_key if not has_key('type'): raise ParseError, ('the type attribute is required', 'dtvar') self.type=t=args['type'] if not valid_type(t): raise ParseErro... | 0541c073b7361c4fdc0a9f187771941cea3015fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0541c073b7361c4fdc0a9f187771941cea3015fd/sqltest.py |
return "%s=%s" % (self.column,vs[0]) | return "%s %s %s" % (self.column, self.op, vs[0]) | def render(self, md): name=self.__name__ t=self.type try: v = md[name] except KeyError, key: if str(key)==name and self.optional: return '' raise KeyError, key, sys.exc_traceback if type(v) in (ListType, TupleType): if len(v) > 1 and not self.multiple: raise 'Multiple Values', ( 'multiple values are not allowed for <... | 0541c073b7361c4fdc0a9f187771941cea3015fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0541c073b7361c4fdc0a9f187771941cea3015fd/sqltest.py |
ev = translate(str(v), nl2sp) if ev.find( '<html>') >= 0: ev = 'bobo exception' self.setHeader('bobo-exception-value', ev[:255]) | ev = 'See the server error log for details' self.setHeader('bobo-exception-value', ev) | def exception(self, fatal=0, info=None, absuri_match=re.compile(r'\w+://[\w\.]+').match, tag_search=re.compile('[a-zA-Z]>').search, abort=1 ): if type(info) is type(()) and len(info) == 3: t, v, tb = info else: t, v, tb = sys.exc_info() | 3a9541f7114ee37a128b176b56d2ba3bf24de2c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3a9541f7114ee37a128b176b56d2ba3bf24de2c1/HTTPResponse.py |
uri=os.path.join(url, absattr(ob.id)) | uri=urljoin(url, absattr(ob.id)) | def apply(self, obj, url=None, depth=0, result=None, top=1): if result is None: result=StringIO() depth=self.depth url=urlfix(self.request['URL'], 'PROPFIND') url=urlbase(url) result.write('<?xml version="1.0" encoding="utf-8"?>\n' \ '<d:multistatus xmlns:d="DAV:">\n') iscol=isDavCollection(obj) if iscol and url[-1] !=... | 03fb4e1b6eb485522ed0478cd95ea0c2a601808d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/03fb4e1b6eb485522ed0478cd95ea0c2a601808d/davcmds.py |
uri = os.path.join(url, absattr(ob.id)) | uri = urljoin(url, absattr(ob.id)) | def apply(self, obj, creator=None, depth='infinity', token=None, result=None, url=None, top=1): """ Apply, built for recursion (so that we may lock subitems of a collection if requested """ | 03fb4e1b6eb485522ed0478cd95ea0c2a601808d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/03fb4e1b6eb485522ed0478cd95ea0c2a601808d/davcmds.py |
uri = os.path.join(url, absattr(ob.id)) | uri = urljoin(url, absattr(ob.id)) | def apply(self, obj, token, url=None, result=None, top=1): if result is None: result = StringIO() url = urlfix(url, 'UNLOCK') url = urlbase(url) iscol = isDavCollection(obj) if iscol and url[-1] != '/': url = url + '/' errmsg = None | 03fb4e1b6eb485522ed0478cd95ea0c2a601808d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/03fb4e1b6eb485522ed0478cd95ea0c2a601808d/davcmds.py |
uri = os.path.join(url, absattr(ob.id)) | uri = urljoin(url, absattr(ob.id)) | def apply(self, obj, token, user, url=None, result=None, top=1): if result is None: result = StringIO() url = urlfix(url, 'DELETE') url = urlbase(url) iscol = isDavCollection(obj) errmsg = None parent = aq_parent(obj) | 03fb4e1b6eb485522ed0478cd95ea0c2a601808d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/03fb4e1b6eb485522ed0478cd95ea0c2a601808d/davcmds.py |
class Prefix: __no_side_effects__=1 def __init__(self, path): self.value = len(path), path def __cmp__(self, o): l,v = self.value rval = cmp(o[:l],v) return rval | def manage_undo_transactions(self, transaction_info=(), REQUEST=None): """ """ undo=Globals.UndoManager.undo for tid in transaction_info: tid=tid.split() if tid: get_transaction().note("Undo %s" % ''.join(tid[1:])) tid=decode64(tid[0]) undo(tid) | 09c54abfe5030a6ba4a90f7a19dd55a70beced43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/09c54abfe5030a6ba4a90f7a19dd55a70beced43/Undo.py | |
code = func.func_code return find_source(code.co_filename, code)[1] | return find_source(func.func_globals['__file__'], func.func_code)[1] | def get_source(func): """Less silly interface to find_source""" # Sheesh code = func.func_code return find_source(code.co_filename, code)[1] | ef68907ccb85c1f4b4bde35ac76cb39e2311e1d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ef68907ccb85c1f4b4bde35ac76cb39e2311e1d0/testRestrictions.py |
_interp = re.compile(r'\$(%(n)s)|\${(%(n)s(?:/%(n)s)*)}' % {'n': NAME_RE}) | _interp = re.compile(r'\$(%(n)s)|\${(%(n)s(?:/[^}]*)*)}' % {'n': NAME_RE}) | def __repr__(self): return '%s:%s' % (self._name, `self._s`) | 530acf3e01bdc7c1247dcbf9a428d241b31dbf6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/530acf3e01bdc7c1247dcbf9a428d241b31dbf6c/Expressions.py |
LOG.warn('Duplicate Product name', 'After loading Product %s from %s,\n' 'I skipped the one in %s.\n' % ( | LOG.warn('Duplicate Product name: ' 'After loading Product %s from %s, ' 'I skipped the one in %s.' % ( | def import_products(): # Try to import each product, checking for and catching errors. done={} products = get_products() debug_mode = App.config.getConfiguration().debug_mode for priority, product_name, index, product_dir in products: if done.has_key(product_name): LOG.warn('Duplicate Product name', 'After loading Pr... | 895b9811bc65976c3564d93e46ed5892cfa51d41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/895b9811bc65976c3564d93e46ed5892cfa51d41/Application.py |
self._registered=1 | self._registered = 1 self._finalize = 0 | def _register(self): if not self._registered: try: get_transaction().register(Surrogate(self)) self._begin() self._registered=1 except: pass | 1a0ea1b2fc6b9c821cf5e267d6c648ce97d43564 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1a0ea1b2fc6b9c821cf5e267d6c648ce97d43564/TM.py |
commit=tpc_abort=tpc_begin | commit=tpc_begin | def tpc_begin(self, *ignored): pass | 1a0ea1b2fc6b9c821cf5e267d6c648ce97d43564 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1a0ea1b2fc6b9c821cf5e267d6c648ce97d43564/TM.py |
try: self._finish() finally: self._registered=0 | if self._finalize: try: self._finish() finally: self._registered=0 | def tpc_finish(self, *ignored): try: self._finish() finally: self._registered=0 | 1a0ea1b2fc6b9c821cf5e267d6c648ce97d43564 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1a0ea1b2fc6b9c821cf5e267d6c648ce97d43564/TM.py |
else: host='' | def domainSpecMatch(spec, request): if request.has_key('REMOTE_HOST'): host=request['REMOTE_HOST'] else: host='' if request.has_key('REMOTE_ADDR'): addr=request['REMOTE_ADDR'] else: addr='' if not host and not addr: return 0 if not host: try: host=socket.gethostbyaddr(addr)[0] except: pass if not addr: try: addr=so... | c75745d3f39f666587a887f3b4fd2bf3d0292345 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c75745d3f39f666587a887f3b4fd2bf3d0292345/User.py | |
else: addr='' | def domainSpecMatch(spec, request): if request.has_key('REMOTE_HOST'): host=request['REMOTE_HOST'] else: host='' if request.has_key('REMOTE_ADDR'): addr=request['REMOTE_ADDR'] else: addr='' if not host and not addr: return 0 if not host: try: host=socket.gethostbyaddr(addr)[0] except: pass if not addr: try: addr=so... | c75745d3f39f666587a887f3b4fd2bf3d0292345 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c75745d3f39f666587a887f3b4fd2bf3d0292345/User.py | |
try: host=socket.gethostbyaddr(addr)[0] | try: host=socket.gethostbyaddr(addr)[0] | def domainSpecMatch(spec, request): if request.has_key('REMOTE_HOST'): host=request['REMOTE_HOST'] else: host='' if request.has_key('REMOTE_ADDR'): addr=request['REMOTE_ADDR'] else: addr='' if not host and not addr: return 0 if not host: try: host=socket.gethostbyaddr(addr)[0] except: pass if not addr: try: addr=so... | c75745d3f39f666587a887f3b4fd2bf3d0292345 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c75745d3f39f666587a887f3b4fd2bf3d0292345/User.py |
try: addr=socket.gethostbyname(host) | try: addr=socket.gethostbyname(host) | def domainSpecMatch(spec, request): if request.has_key('REMOTE_HOST'): host=request['REMOTE_HOST'] else: host='' if request.has_key('REMOTE_ADDR'): addr=request['REMOTE_ADDR'] else: addr='' if not host and not addr: return 0 if not host: try: host=socket.gethostbyaddr(addr)[0] except: pass if not addr: try: addr=so... | c75745d3f39f666587a887f3b4fd2bf3d0292345 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c75745d3f39f666587a887f3b4fd2bf3d0292345/User.py |
if _sz != _alen: continue | def domainSpecMatch(spec, request): if request.has_key('REMOTE_HOST'): host=request['REMOTE_HOST'] else: host='' if request.has_key('REMOTE_ADDR'): addr=request['REMOTE_ADDR'] else: addr='' if not host and not addr: return 0 if not host: try: host=socket.gethostbyaddr(addr)[0] except: pass if not addr: try: addr=so... | c75745d3f39f666587a887f3b4fd2bf3d0292345 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c75745d3f39f666587a887f3b4fd2bf3d0292345/User.py | |
print handler | def manage_catalogReindex(self, REQUEST, RESPONSE, URL1): """ clear the catalog, then re-index everything """ | f1ad7b9c1e84ebd1bcd4f9edc060ff84d518c01f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f1ad7b9c1e84ebd1bcd4f9edc060ff84d518c01f/ZCatalog.py | |
def manage_edit(self,file,title,content_type='',acl_type='A',acl_roles=[], REQUEST=None): | def manage_edit(self,title,file='',content_type='',acl_type='A',acl_roles=[], REQUEST=None): | def manage_edit(self,file,title,content_type='',acl_type='A',acl_roles=[], REQUEST=None): | 2d3e843ae7d2d67687ba9f4e71e2550cd9355a4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2d3e843ae7d2d67687ba9f4e71e2550cd9355a4f/Image.py |
vself=self.v_self() | def manage_changeProperties(self, REQUEST=None, **kw): """Change existing object properties by passing either a mapping object of name:value pairs {'foo':6} or passing name=value parameters.""" if REQUEST is None: props={} else: props=REQUEST if kw: for name, value in kw.items(): props[name]=value propdict=self._propdi... | 2101a9e0a9ab499b27b5c93e6545208184caca0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2101a9e0a9ab499b27b5c93e6545208184caca0a/PropertySheets.py | |
vself._updateProperty(name, value) | self._updateProperty(name, value) | def manage_changeProperties(self, REQUEST=None, **kw): """Change existing object properties by passing either a mapping object of name:value pairs {'foo':6} or passing name=value parameters.""" if REQUEST is None: props={} else: props=REQUEST if kw: for name, value in kw.items(): props[name]=value propdict=self._propdi... | 2101a9e0a9ab499b27b5c93e6545208184caca0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2101a9e0a9ab499b27b5c93e6545208184caca0a/PropertySheets.py |
message='The title is now "%s"<br>' 'The base is now "%s"<br>' 'The path is now "%s"<br>' % map(escape, (title, base, path)), | message='SiteRoot changed.', | def manage_edit(self, title, base, path, REQUEST=None): '''Set the title, base, and path''' self.__init__(title, base, path) if REQUEST: return MessageDialog(title='SiteRoot changed.', message='The title is now "%s"<br>' 'The base is now "%s"<br>' 'The path is now "%s"<br>' % map(escape, (title, base, path)), action='%... | 5963e711124cd5df738e5b64965a29f85b40c091 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/5963e711124cd5df738e5b64965a29f85b40c091/SiteRoot.py |
def initPCGI(self): import os self.initPrincipia() if self.resource.has_key('PCGI_ERROR_LOG'): self.errorLogFile = self.resource['PCGI_ERROR_LOG'] if self.resource.has_key('PCGI_HOST'): self.hostname = self.resource['PCGI_HOST'] if self.resource.has_key('PCGI_INSERT_PATH'): self.insertPath = self.resource['PCGI_INSERT_... | ca4171ed7c5430be93ad5c7d1ee9dcce872cbf89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ca4171ed7c5430be93ad5c7d1ee9dcce872cbf89/pcgi_publisher.py | ||
stdin = TemporaryFile('wb') | stdin = TemporaryFile('w+b') | def handler(self, conn): from string import split, join, atoi hdr = conn.recv(10) | ca4171ed7c5430be93ad5c7d1ee9dcce872cbf89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ca4171ed7c5430be93ad5c7d1ee9dcce872cbf89/pcgi_publisher.py |
def _populateIndex( self ): for k, v in self._values: self._index.index_object( k, v ) | 8844458f97eb2fef130e17d42eada832d2aa0d90 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8844458f97eb2fef130e17d42eada832d2aa0d90/testUnKeywordIndex.py | ||
raise | def testRunIgnoresParentSignals(self): # Spawn a process which will in turn spawn a zdrun process. # We make sure that the zdrun process is still running even if # its parent process receives an interrupt signal (it should # not be passed to zdrun). zdrun_socket = os.path.join(self.here, 'testsock') zdctlpid = os.spawn... | 2d2918750a02c6af0b69122cf14a94e14cbebae9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2d2918750a02c6af0b69122cf14a94e14cbebae9/testzdrun.py | |
raise | def send_action(action, sockname): """Send an action to the zdrun server and return the response. Return None if the server is not up or any other error happened. """ sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) try: sock.connect(sockname) sock.send(action + "\n") sock.shutdown(1) # We're not writing any m... | 2d2918750a02c6af0b69122cf14a94e14cbebae9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2d2918750a02c6af0b69122cf14a94e14cbebae9/testzdrun.py | |
def _str(self,structure,level, # Static bullet=ts_regex.compile('[ \t\n]*[o*-][ \t\n]+\([^\0]*\)' ).match_group, example=ts_regex.compile('[\0- ]examples?:[\0- ]*$' ).search, dl=ts_regex.compile('\([^\n]+\)[ \t]+--[ \t\n]+\([^\0]*\)' ).match_group, nl=ts_regex.compile('\n').search, ol=ts_regex.compile( '[ \t]*\(\([0-9]... | 2e04a40b8274dd6418b2fd9e9a73f746b49f1e40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2e04a40b8274dd6418b2fd9e9a73f746b49f1e40/StructuredText.py | ||
r=self.ul(r,p,self._str(s[1],level)) | if s[0][-2:]=='::' and s[1]: ps=self.pre(s[1]) else: ps=self._str(s[1],level) r=self.ul(r,p,ps) continue ts_results = ol(s[0], (3,)) if ts_results: p = ts_results[1] if s[0][-2:]=='::' and s[1]: ps=self.pre(s[1]) else: ps=self._str(s[1],level) r=self.ol(r,p,ps) continue ts_results = olp(s[0], (1,)) if ts_results: p = t... | def _str(self,structure,level, # Static bullet=ts_regex.compile('[ \t\n]*[o*-][ \t\n]+\([^\0]*\)' ).match_group, example=ts_regex.compile('[\0- ]examples?:[\0- ]*$' ).search, dl=ts_regex.compile('\([^\n]+\)[ \t]+--[ \t\n]+\([^\0]*\)' ).match_group, nl=ts_regex.compile('\n').search, ol=ts_regex.compile( '[ \t]*\(\([0-9]... | 2e04a40b8274dd6418b2fd9e9a73f746b49f1e40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2e04a40b8274dd6418b2fd9e9a73f746b49f1e40/StructuredText.py |
ts_results = ol(s[0], (3,)) if ts_results: p = ts_results[1] r=self.ol(r,p,self._str(s[1],level)) | if nl(s[0]) < 0 and s[1] and s[0][-1:] != ':': t=s[0] r=self.head(r,t,level, self._str(s[1],level and level+1)) | def _str(self,structure,level, # Static bullet=ts_regex.compile('[ \t\n]*[o*-][ \t\n]+\([^\0]*\)' ).match_group, example=ts_regex.compile('[\0- ]examples?:[\0- ]*$' ).search, dl=ts_regex.compile('\([^\n]+\)[ \t]+--[ \t\n]+\([^\0]*\)' ).match_group, nl=ts_regex.compile('\n').search, ol=ts_regex.compile( '[ \t]*\(\([0-9]... | 2e04a40b8274dd6418b2fd9e9a73f746b49f1e40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2e04a40b8274dd6418b2fd9e9a73f746b49f1e40/StructuredText.py |
ts_results = olp(s[0], (1,)) if ts_results: p = ts_results[1] r=self.ol(r,p,self._str(s[1],level)) else: ts_results = dl(s[0], (1,2)) if ts_results: t,d = ts_results[1] r=self.dl(r,t,d,self._str(s[1],level)) else: if example(s[0]) >= 0 and s[1]: r=self.normal(r,s[0],self.pre(s[1])) else: if s[0][-2:]=='::' and s[1]: ... | r=self.normal(r,s[0],self._str(s[1],level)) | def _str(self,structure,level, # Static bullet=ts_regex.compile('[ \t\n]*[o*-][ \t\n]+\([^\0]*\)' ).match_group, example=ts_regex.compile('[\0- ]examples?:[\0- ]*$' ).search, dl=ts_regex.compile('\([^\n]+\)[ \t]+--[ \t\n]+\([^\0]*\)' ).match_group, nl=ts_regex.compile('\n').search, ol=ts_regex.compile( '[ \t]*\(\([0-9]... | 2e04a40b8274dd6418b2fd9e9a73f746b49f1e40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2e04a40b8274dd6418b2fd9e9a73f746b49f1e40/StructuredText.py |
user = str(stat_info[stat.ST_UID].replace(' ','_')) group= str(stat_info[stat.ST_GID].replace(' ','_')) | user = str(stat_info[stat.ST_UID]).replace(' ','_') group= str(stat_info[stat.ST_GID]).replace(' ','_') | def unix_longify (file, stat_info): # for now, only pay attention to the lower bits mode = ('%o' % stat_info[stat.ST_MODE])[-3:] mode = string.join (map (lambda x: mode_table[x], mode), '') if stat.S_ISDIR (stat_info[stat.ST_MODE]): dirchar = 'd' else: dirchar = '-' date = ls_date (long(time.time()), stat_info[stat.ST_... | 1b8fb6278a46939928645fe392c6b79ace8f7e10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1b8fb6278a46939928645fe392c6b79ace8f7e10/filesys.py |
mhost.send(self.section(md.this, md), self.mailto, self.mailfrom, self.subject) | def render(self, md): | 53e8eba6ce49966c6674e30a42281ad76780896e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/53e8eba6ce49966c6674e30a42281ad76780896e/SendMailTag.py | |
mhost.send(self.section(md.this, md), self.mailto, self.mailfrom, self.subject) | mhost.send(self.section(md.this, md), self.mailto, self.mailfrom, self.subject) | def render(self, md): | 53e8eba6ce49966c6674e30a42281ad76780896e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/53e8eba6ce49966c6674e30a42281ad76780896e/SendMailTag.py |
onClick="javascript:window.open("%s/manage_main", "manage_main").focus()" | onClick="javascript:window.open('%s/manage_main', 'manage_main').focus()" | def tutorialShowLesson(self, id, REQUEST): """ Navigate management frame to a given lesson's screen. """ url=self.lessonURL(id, REQUEST) if not url: return """\ | f33d10f51344a7fa68e575fe90f4f7f71f1e3d10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f33d10f51344a7fa68e575fe90f4f7f71f1e3d10/TutorialTopic.py |
def extractLayer(func): def wrap(*args, **kw): suite = func(*args, **kw) tc = kw.get('test_class', None) if tc and hasattr(tc, 'layer'): suite.layer = tc.layer return suite return wrap | def extractLayer(func): def wrap(*args, **kw): suite = func(*args, **kw) tc = kw.get('test_class', None) if tc and hasattr(tc, 'layer'): suite.layer = tc.layer return suite return wrap | 0f8c43cbed1421a01aee7ba731daec005c495fea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0f8c43cbed1421a01aee7ba731daec005c495fea/functional.py | |
return doctest.DocTestSuite(*self._args, **self._kw) | suite = doctest.DocTestSuite(*self._args, **self._kw) if self._layer is not None: suite.layer = self._layer return suite | def doctestsuite(self): return doctest.DocTestSuite(*self._args, **self._kw) | 0f8c43cbed1421a01aee7ba731daec005c495fea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0f8c43cbed1421a01aee7ba731daec005c495fea/functional.py |
return doctest.DocFileSuite(*self._args, **self._kw) | suite = doctest.DocFileSuite(*self._args, **self._kw) if self._layer is not None: suite.layer = self._layer return suite | def docfilesuite(self): return doctest.DocFileSuite(*self._args, **self._kw) | 0f8c43cbed1421a01aee7ba731daec005c495fea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0f8c43cbed1421a01aee7ba731daec005c495fea/functional.py |
@extractLayer | def setup_optionflags(self): if 'optionflags' not in self._kw: self._kw['optionflags'] = (doctest.ELLIPSIS | doctest.REPORT_NDIFF | doctest.NORMALIZE_WHITESPACE) | 0f8c43cbed1421a01aee7ba731daec005c495fea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0f8c43cbed1421a01aee7ba731daec005c495fea/functional.py | |
module = doctest._normalize_module(module, depth=3) | module = doctest._normalize_module(module) | def ZopeDocTestSuite(module=None, **kw): module = doctest._normalize_module(module, depth=3) return ZopeSuiteFactory(module, **kw).doctestsuite() | 0f8c43cbed1421a01aee7ba731daec005c495fea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0f8c43cbed1421a01aee7ba731daec005c495fea/functional.py |
@extractLayer | def ZopeDocTestSuite(module=None, **kw): module = doctest._normalize_module(module, depth=3) return ZopeSuiteFactory(module, **kw).doctestsuite() | 0f8c43cbed1421a01aee7ba731daec005c495fea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0f8c43cbed1421a01aee7ba731daec005c495fea/functional.py | |
kw['package'] = doctest._normalize_module(kw.get('package'), depth=3) | kw['package'] = doctest._normalize_module(kw.get('package')) | def ZopeDocFileSuite(*paths, **kw): if kw.get('module_relative', True): kw['package'] = doctest._normalize_module(kw.get('package'), depth=3) return ZopeSuiteFactory(*paths, **kw).docfilesuite() | 0f8c43cbed1421a01aee7ba731daec005c495fea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0f8c43cbed1421a01aee7ba731daec005c495fea/functional.py |
@extractLayer | def ZopeDocFileSuite(*paths, **kw): if kw.get('module_relative', True): kw['package'] = doctest._normalize_module(kw.get('package'), depth=3) return ZopeSuiteFactory(*paths, **kw).docfilesuite() | 0f8c43cbed1421a01aee7ba731daec005c495fea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0f8c43cbed1421a01aee7ba731daec005c495fea/functional.py | |
module = doctest._normalize_module(module, depth=3) | module = doctest._normalize_module(module) | def FunctionalDocTestSuite(module=None, **kw): module = doctest._normalize_module(module, depth=3) return FunctionalSuiteFactory(module, **kw).doctestsuite() | 0f8c43cbed1421a01aee7ba731daec005c495fea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0f8c43cbed1421a01aee7ba731daec005c495fea/functional.py |
@extractLayer | def FunctionalDocTestSuite(module=None, **kw): module = doctest._normalize_module(module, depth=3) return FunctionalSuiteFactory(module, **kw).doctestsuite() | 0f8c43cbed1421a01aee7ba731daec005c495fea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0f8c43cbed1421a01aee7ba731daec005c495fea/functional.py | |
kw['package'] = doctest._normalize_module(kw.get('package'), depth=3) | kw['package'] = doctest._normalize_module(kw.get('package')) | def FunctionalDocFileSuite(*paths, **kw): if kw.get('module_relative', True): kw['package'] = doctest._normalize_module(kw.get('package'), depth=3) return FunctionalSuiteFactory(*paths, **kw).docfilesuite() | 0f8c43cbed1421a01aee7ba731daec005c495fea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0f8c43cbed1421a01aee7ba731daec005c495fea/functional.py |
self.libdir = os.path.realpath(os.path.join(self.cwd, libdir)) else: self.libdir = os.path.realpath(os.path.join(self.cwd, self.libdir)) if self.libdir not in sys.path: sys.path.insert(0, self.libdir) | self.libdir = os.path.join(self.cwd, libdir) else: self.libdir = os.path.join(self.cwd, self.libdir) real_libdir = os.path.realpath(self.libdir) if real_libdir not in sys.path: sys.path.insert(0, real_libdir) | def __init__(self, build, libdir=None): # Calculate which directories we're going to add to sys.path. self.libdir = "lib/python" # Hack sys.path self.home = os.path.dirname(os.path.realpath(sys.argv[0])) # test.py lives in $ZOPE_HOME/bin when installed ... dir, file = os.path.split(self.home) if file == 'bin': self.hom... | c5588353413ee0de38ed8b76201ff2d900c62b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c5588353413ee0de38ed8b76201ff2d900c62b4a/test.py |
aq_get=aq_get, None=None, | aq_get=aq_get, | def getOwner(self, info=0, aq_get=aq_get, None=None, UnownableOwner=UnownableOwner, getSecurityManager=getSecurityManager, ): """Get the owner | 61df9afca7084deda6e62dd106d50e29e775e582 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/61df9afca7084deda6e62dd106d50e29e775e582/Owned.py |
expr=re.compile("\_([%s0-9\s\.,\?\/]+)\_" % letters).search): | expr=re.compile("\s*\_([%s0-9\s\.,\?\/]+)\_" % letters).search): | def doc_underline(self, s, expr=re.compile("\_([%s0-9\s\.,\?\/]+)\_" % letters).search): result = expr(s) if result: start,end = result.span(1) st,e = result.span() return (StructuredTextUnderline(s[start:end]),st,e) else: return None | a5366acb444226287a75e344a409e651b37a9e4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a5366acb444226287a75e344a409e651b37a9e4a/ClassicDocumentClass.py |
if level > 3: output('<TD COLSPAN="%s"></TD>' % level) elif level > 1: output('<TD></TD>' * level) | if level > 2: output('<TD COLSPAN="%s"></TD>' % level) elif level > 0: output('<TD></TD>' * level) | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0, args=None): have_arg=args.has_key try: items=self.tpValues() except: items=None if not items and have_arg('leaves'): items=1 tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-ite... | 3ccf0135f7d39206314b0f01e08ce87179009a79 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3ccf0135f7d39206314b0f01e08ce87179009a79/TreeTag.py |
self.stream_write("\n") | self._stream_write("\n") self.col = 0 | def __call__(self): assert self.level == 0 assert self.scopeLevel == 0 self.interpret(self.program) assert self.level == 0 assert self.scopeLevel == 0 if self.col > 0: self.stream_write("\n") | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
self.stream.write(s) i = string.rfind(s, '\n') | self._stream_write(s) i = rfind(s, '\n') | def stream_write(self, s): self.stream.write(s) i = string.rfind(s, '\n') if i < 0: self.col = self.col + len(s) else: self.col = len(s) - (i + 1) | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
for item in program: methodName = "do_" + item[0] args = item[1:] if self.debug: s = "%s%s%s\n" % (" "*self.level, methodName, | if self.debug: for (opcode, args) in program: s = "%sdo_%s%s\n" % (" "*self.level, opcode, | def interpret(self, program): self.level = self.level + 1 try: for item in program: methodName = "do_" + item[0] args = item[1:] if self.debug: s = "%s%s%s\n" % (" "*self.level, methodName, repr(args)) if len(s) > 80: s = s[:76] + "...\n" sys.stderr.write(s) method = getattr(self, methodName) apply(method, args) fin... | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
method = getattr(self, methodName) apply(method, args) | _apply(handlers[opcode], tup + args) else: for (opcode, args) in program: _apply(handlers[opcode], tup + args) | def interpret(self, program): self.level = self.level + 1 try: for item in program: methodName = "do_" + item[0] args = item[1:] if self.debug: s = "%s%s%s\n" % (" "*self.level, methodName, repr(args)) if len(s) > 80: s = s[:76] + "...\n" sys.stderr.write(s) method = getattr(self, methodName) apply(method, args) fin... | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
self.startTagCommon(name, attrList, self.endsep) def do_startTag(self, name, attrList): self.startTagCommon(name, attrList, ">") def startTagCommon(self, name, attrList, end): | self.do_startTag(name, attrList, self.endsep) bytecode_handlers["startEndTag"] = do_startEndTag def do_startTag(self, name, attrList, end=">"): | def do_startEndTag(self, name, attrList): self.startTagCommon(name, attrList, self.endsep) | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
self.stream_write("<%s%s" % (name, end)) return self.stream_write("<" + name) align = self.col+1 | s = "<%s%s" % (name, end) self.do_rawtextOffset(s, len(s)) return _len = len self._stream_write("<" + name) self.col = self.col + _len(name) + 1 align = self.col + 1 + _len(name) | def startTagCommon(self, name, attrList, end): if not attrList: self.stream_write("<%s%s" % (name, end)) return self.stream_write("<" + name) align = self.col+1 if align >= self.wrap/2: align = 4 # Avoid a narrow column far to the right for item in attrList: if len(item) == 2: name, value = item[:2] else: ok, name, val... | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
if len(item) == 2: name, value = item[:2] | if _len(item) == 2: name, value = item | def startTagCommon(self, name, attrList, end): if not attrList: self.stream_write("<%s%s" % (name, end)) return self.stream_write("<" + name) align = self.col+1 if align >= self.wrap/2: align = 4 # Avoid a narrow column far to the right for item in attrList: if len(item) == 2: name, value = item[:2] else: ok, name, val... | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
self.col + 1 + len(s) > self.wrap): self.stream_write("\n" + " "*align + s) | self.col + 1 + _len(s) > self.wrap): self._stream_write("\n" + " "*align) self.col = self.col + align | def startTagCommon(self, name, attrList, end): if not attrList: self.stream_write("<%s%s" % (name, end)) return self.stream_write("<" + name) align = self.col+1 if align >= self.wrap/2: align = 4 # Avoid a narrow column far to the right for item in attrList: if len(item) == 2: name, value = item[:2] else: ok, name, val... | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
self.stream_write(" " + s) self.stream_write(end) | s = " " + s self._stream_write(s) if "\n" in s: self.col = _len(s) - (rfind(s, "\n") + 1) else: self.col = self.col + _len(s) self._stream_write(end) self.col = self.col + _len(end) bytecode_handlers["startTag"] = do_startTag | def startTagCommon(self, name, attrList, end): if not attrList: self.stream_write("<%s%s" % (name, end)) return self.stream_write("<" + name) align = self.col+1 if align >= self.wrap/2: align = 4 # Avoid a narrow column far to the right for item in attrList: if len(item) == 2: name, value = item[:2] else: ok, name, val... | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
if self.html and string.lower(name) in BOOLEAN_HTML_ATTRS: | if self.html and lower(name) in BOOLEAN_HTML_ATTRS: | def attrAction(self, item): name, value = item[:2] try: action = self.actionIndex[item[2]] except KeyError: raise TALError, ('Error in TAL program', self.position) if not self.showtal and action > 1: return 0, name, value ok = 1 if action <= 1 and self.tal: if self.html and string.lower(name) in BOOLEAN_HTML_ATTRS: eva... | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
elif not evalue: | elif evalue: value = None else: | def attrAction(self, item): name, value = item[:2] try: action = self.actionIndex[item[2]] except KeyError: raise TALError, ('Error in TAL program', self.position) if not self.showtal and action > 1: return 0, name, value ok = 1 if action <= 1 and self.tal: if self.html and string.lower(name) in BOOLEAN_HTML_ATTRS: eva... | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
else: value = None | def attrAction(self, item): name, value = item[:2] try: action = self.actionIndex[item[2]] except KeyError: raise TALError, ('Error in TAL program', self.position) if not self.showtal and action > 1: return 0, name, value ok = 1 if action <= 1 and self.tal: if self.html and string.lower(name) in BOOLEAN_HTML_ATTRS: eva... | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py | |
i = string.rfind(name, ":") + 1 | i = rfind(name, ":") + 1 | def attrAction(self, item): name, value = item[:2] try: action = self.actionIndex[item[2]] except KeyError: raise TALError, ('Error in TAL program', self.position) if not self.showtal and action > 1: return 0, name, value ok = 1 if action <= 1 and self.tal: if self.html and string.lower(name) in BOOLEAN_HTML_ATTRS: eva... | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
self.stream_write("</%s>" % name) | s = "</%s>" % name self._stream_write(s) self.col = self.col + len(s) bytecode_handlers["endTag"] = do_endTag | def do_endTag(self, name): self.stream_write("</%s>" % name) | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
if not self.tal: return value = self.engine.evaluateValue(expr) self.engine.setLocal(name, value) | if self.tal: value = self.engine.evaluateValue(expr) self.engine.setLocal(name, value) bytecode_handlers["setLocal"] = do_setLocal | def do_setLocal(self, name, expr): if not self.tal: return value = self.engine.evaluateValue(expr) self.engine.setLocal(name, value) | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
if not self.tal: return value = self.engine.evaluateValue(expr) self.engine.setGlobal(name, value) | if self.tal: value = self.engine.evaluateValue(expr) self.engine.setGlobal(name, value) bytecode_handlers["setGlobal"] = do_setGlobal | def do_setGlobal(self, name, expr): if not self.tal: return value = self.engine.evaluateValue(expr) self.engine.setGlobal(name, value) | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
text = cgi.escape(text) self.stream_write(text) | self.stream_write(cgi.escape(text)) bytecode_handlers["insertText"] = do_insertText | def do_insertText(self, expr, block): if not self.tal: self.interpret(block) return text = self.engine.evaluateText(expr) if text is None: return if text is self.Default: self.interpret(block) return text = cgi.escape(text) self.stream_write(text) | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
if not repldict and not self.strictinsert: | if not (repldict or self.strictinsert): | def do_insertStructure(self, expr, repldict, block): if not self.tal: self.interpret(block) return structure = self.engine.evaluateStructure(expr) if structure is None: return if structure is self.Default: self.interpret(block) return text = str(structure) if not repldict and not self.strictinsert: # Take a shortcut, n... | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
def do_rawtext(self, text): self.stream_write(text) | bytecode_handlers["loop"] = do_loop def do_rawtextColumn(self, s, col): self._stream_write(s) self.col = col bytecode_handlers["rawtextColumn"] = do_rawtextColumn def do_rawtextOffset(self, s, offset): self._stream_write(s) self.col = self.col + offset bytecode_handlers["rawtextOffset"] = do_rawtextOffset | def do_loop(self, name, expr, block): if not self.tal: self.interpret(block) return iterator = self.engine.setRepeat(name, expr) while iterator.next(): self.interpret(block) | 9e161e97a6a5d5ad093527696fe023a7f75f261c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e161e97a6a5d5ad093527696fe023a7f75f261c/TALInterpreter.py |
if useSplitter: self.useSplitter = userSplitter | self.useSplitter = useSplitter | def __init__(self,useSplitter=None): self.clear() if useSplitter: self.useSplitter = userSplitter self.SplitterFunc = Splitter.getSplitter(self.useSplitter) | 6cbf557df9e44469b4c055c71e4b0d8c13d3d14a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6cbf557df9e44469b4c055c71e4b0d8c13d3d14a/GlobbingLexicon.py |
@extractLayer | def setup_optionflags(self): if 'optionflags' not in self._kw: self._kw['optionflags'] = (doctest.ELLIPSIS | doctest.REPORT_NDIFF | doctest.NORMALIZE_WHITESPACE) | 411238470785495df31580541cc39944cf655e11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/411238470785495df31580541cc39944cf655e11/functional.py | |
@extractLayer | def ZopeDocTestSuite(module=None, **kw): module = doctest._normalize_module(module) return ZopeSuiteFactory(module, **kw).doctestsuite() | 411238470785495df31580541cc39944cf655e11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/411238470785495df31580541cc39944cf655e11/functional.py | |
@extractLayer | def ZopeDocFileSuite(*paths, **kw): if kw.get('module_relative', True): kw['package'] = doctest._normalize_module(kw.get('package')) return ZopeSuiteFactory(*paths, **kw).docfilesuite() | 411238470785495df31580541cc39944cf655e11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/411238470785495df31580541cc39944cf655e11/functional.py | |
@extractLayer | def FunctionalDocTestSuite(module=None, **kw): module = doctest._normalize_module(module) return FunctionalSuiteFactory(module, **kw).doctestsuite() | 411238470785495df31580541cc39944cf655e11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/411238470785495df31580541cc39944cf655e11/functional.py | |
x, wx = merge.pop_smallest() y, wy = merge.pop_smallest() | (x, wx), dummy = merge.pop_smallest() (y, wy), dummy = merge.pop_smallest() | def _union(self, L): if not L: return IIBTree() # Balance unions as closely as possible, smallest to largest. merge = NBest(len(L)) for x, weight in L: merge.add((x, weight), len(x)) while len(merge) > 1: # Merge the two smallest so far, and add back to the queue. x, wx = merge.pop_smallest() y, wy = merge.pop_smallest... | ca38cb4158c3e984ae921184c53b07c50682f7e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ca38cb4158c3e984ae921184c53b07c50682f7e6/OkapiIndex.py |
__tracenack_info__=type(ob), ob.__class__ | 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_... | 66a86be2700f06f34789afde708e03af4ac41a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/66a86be2700f06f34789afde708e03af4ac41a91/CopySupport.py | |
if name != 'Anonymous': | if name != 'Anonymous User': | def _setObject(self,id,object,roles=None,user=None): v=self._checkId(id) if v is not None: id=v try: t=object.meta_type except: t=None self._objects=self._objects+({'id':id,'meta_type':t},) self._setOb(id,object) # Try to give user the local role "Owner". if hasattr(self, 'REQUEST') and hasattr(object, '__ac_local_r... | 2bc945654962caeab2af07af98ae954bd0d87bdd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2bc945654962caeab2af07af98ae954bd0d87bdd/ObjectManager.py |
pid = os.fork() if pid: sys.exit(0) posix.setsid() | if not os.environ.has_key('Z_DEBUG_MODE'): pid = os.fork() if pid: sys.exit(0) posix.setsid() | def run(argv, pidfile=''): if os.environ.has_key('ZDAEMON_MANAGED'): # We're the child at this point. Don't ask. :/ return os.environ['ZDAEMON_MANAGED']='TRUE' while 1: pid = os.fork() if pid: sys.exit(0) posix.setsid() lastt=time.time() try: pid = forkit() if pid is None: raise ForkError elif pid: # Parent psta... | bcfb2ab40d5a0248a611d6f5e2c74235ae10f674 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/bcfb2ab40d5a0248a611d6f5e2c74235ae10f674/zdaemon.py |
base64.decodestring(split(auth)[-1]).split(':') | base64.decodestring(auth.split()[-1]).split(':') | def _authUserPW(self): global base64 auth=self._auth if auth: if auth[:6].lower() == 'basic ': if base64 is None: import base64 [name,password] = \ base64.decodestring(split(auth)[-1]).split(':') return name, password | 22ad134ef935c329845fc4467ba3d09a9fb64555 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/22ad134ef935c329845fc4467ba3d09a9fb64555/HTTPRequest.py |
manage_FTPget=index_html | def manage_FTPget(self): """Return body for ftp.""" return str(self.data) | def __len__(self): return 1 | 3d9f93f6551341a82b8243fe769db1bb3f6c5d12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3d9f93f6551341a82b8243fe769db1bb3f6c5d12/Image.py |
output('<TD WIDTH="16"></TD>\n') | output('<TD WIDTH="16">%s</TD>\n' % icoSpace) | def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data, colspan, section, md, treeData, level=0, args=None): "Render a tree as a table" have_arg=args.has_key if level >= 0: tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl root_url = root_url or tpUrl treeData['tree-item-url']=url ... | 66181974654112e551f907a966d70e3bfebeb1a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/66181974654112e551f907a966d70e3bfebeb1a3/TreeTag.py |
return marshal.dumps((self.id,stat)) | if callable(self.id): id=self.id() else: id=self.id return marshal.dumps((id,stat)) | def manage_FTPlist(self,REQUEST): """Directory listing for FTP. In the case of non-Foldoid objects, the listing should contain one object, the object itself.""" stat=marshal.loads(self.manage_FTPstat(REQUEST)) return marshal.dumps((self.id,stat)) | 49421aab63124d2f32cc771c8264083a5d0a9304 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/49421aab63124d2f32cc771c8264083a5d0a9304/SimpleItem.py |
for name in ('version.txt', 'VERSION.TXT', 'VERSION.txt'): version_txt=path_join(package_dir, name) if not exists(version_txt): continue | version_txt = None for name in ('VERSION.TXT', 'VERSION.txt', 'version.txt'): if exists(path_join(package_dir, name)): version_txt = v break if version_txt is not None: | def version_list(self): # Return a list of currently installed products/versions path_join=os.path.join isdir=os.path.isdir exists=os.path.exists strip=string.strip | 3379093b2caa12881e3e9db6f03a2130b0bdc28a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3379093b2caa12881e3e9db6f03a2130b0bdc28a/ApplicationManager.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.