rem
stringlengths 1
322k
| add
stringlengths 0
2.05M
| context
stringlengths 4
228k
| meta
stringlengths 156
215
|
---|---|---|---|
'<hr><strong>Error, <em>%s</em>:</strong> %s' | '<strong>Error, <em>%s</em>:</strong> %s' | def manage_test(self, REQUEST): | 47eff56d1f2c9cc7ed46d7a29ef15a29fd392e25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/47eff56d1f2c9cc7ed46d7a29ef15a29fd392e25/DA.py |
'<!-- % r) | '<!-- '<hr><strong>SQL used:</strong><br>\n<pre>\n%s\n</pre>/n<hr>\n' '</body></html>' % (r,src)) | def manage_test(self, REQUEST): | 47eff56d1f2c9cc7ed46d7a29ef15a29fd392e25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/47eff56d1f2c9cc7ed46d7a29ef15a29fd392e25/DA.py |
def __call__(self, REQUEST=None, **kw): | def __call__(self, REQUEST=None, src__=0, **kw): | def __call__(self, REQUEST=None, **kw): | 47eff56d1f2c9cc7ed46d7a29ef15a29fd392e25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/47eff56d1f2c9cc7ed46d7a29ef15a29fd392e25/DA.py |
else: isHTML = split(headers.get('content-type', ''), ';')[0] == 'text/html' if isHTML and end_of_header_search(self.body) < 0: lhtml=html_search(body) if lhtml >= 0: lhtml=lhtml+6 body='%s<head></head>\n%s' % (body[:lhtml],body[lhtml:]) elif contHTML: body='<html><head></head>\n' + body else: body='<html><head></head>\n' + body + '\n</html>\n' self.setBody(body) body=self.body | def __str__(self, html_search=regex.compile('<html>',regex.casefold).search, ): if self._wrote: return '' # Streaming output was used. | db3118940e5d3cf9c0ee7e91385ba56bfb110163 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/db3118940e5d3cf9c0ee7e91385ba56bfb110163/HTTPResponse.py |
|
raise TALESError("unknown variable: %s", expr) | raise TALESError("unknown variable: %s" % `expr`) | def evaluate(self, expression): expression = self.uncompile(expression) m = re.match(r"(?s)(%s):(.*)\Z" % NAME_RE, expression) if m: type, expr = m.group(1, 2) else: type = "path" expr = expression if type in ("string", "str"): return expr if type in ("path", "var", "global", "local"): expr = string.strip(expr) if self.locals.has_key(expr): return self.locals[expr] elif self.globals.has_key(expr): return self.globals[expr] else: raise TALESError("unknown variable: %s", expr) if type == "not": v = self.evaluate(expr) return not v if type == "exists": return self.locals.has_key(expr) or self.globals.has_key(expr) if type == "python": try: return eval(expr, self.globals, self.locals) except: t, v, tb = info = sys.exc_info() raise TALESError("evaluation error in %s" % `expr`, info=sys.exc_info()) raise TALESError("unrecognized expression: " + `expression`) | d26a3d9f7f4d105327564f2335c4fa525bea9801 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d26a3d9f7f4d105327564f2335c4fa525bea9801/DummyEngine.py |
text, encoding = convertToUnicode(state['_text'], state['content_type']) | text, encoding = convertToUnicode(state['_text'], state.get('content_type', 'text/html')) | def __setstate__(self, state): # Perform on-the-fly migration to unicode. # Perhaps it might be work with the 'generation' module here? if not isinstance(state['_text'], unicode): text, encoding = convertToUnicode(state['_text'], state['content_type']) state['_text'] = text state['output_encoding'] = encoding self.__dict__.update(state) | 4134bb9ceeb062e724e3eef90b939d1e895a1004 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4134bb9ceeb062e724e3eef90b939d1e895a1004/ZopePageTemplate.py |
def testExpandsionMap(self): | def testExpansionMap(self): | def testExpandsionMap(self): treeroot = self.tm.tree(self.root, self.expansionmap) | a694a566d152744dc9517e3bea4772e82277d7e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a694a566d152744dc9517e3bea4772e82277d7e9/testTree.py |
if folder_permissions.has_key[permission]: | if folder_permissions.has_key(permission): | def productItems(self, name=name): t=[] for i in self.objectMap(): if i['meta_type']=='Image': n=i['name'] t.append((n,getattr(self,n))) return t | df16072045ba746be189cac605b1cbf53e0236dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/df16072045ba746be189cac605b1cbf53e0236dc/Application.py |
for name in self._catalog.indexes.keys(): | for name in self._catalog.schema.keys(): | def _searchable_result_columns(self): r = [] for name in self._catalog.indexes.keys(): i = {} i['name'] = name i['type'] = 's' i['parser'] = str i['width'] = 8 r.append(i) r.append({'name': 'data_record_id_', 'type': 's', 'parser': str, 'width': 8}) return r | 9288fea73ba3894c3fcc1d66637f1d9e3daf0bf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9288fea73ba3894c3fcc1d66637f1d9e3daf0bf4/ZCatalog.py |
list(self._getProductRegistryData(type)) | list(self.aq_acquire('_getProductRegistryData')(type)) | def _manage_add_product_data(self, type, product, id, **data): values=filter( lambda d, product=product, id=id: not (d['product']==product and d['id']==id), list(self._getProductRegistryData(type)) ) | 54b2a83111b8a73d3b6de2c5e896c815dc3aa42e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/54b2a83111b8a73d3b6de2c5e896c815dc3aa42e/ProductRegistry.py |
self._setProductRegistryData(type, tuple(values)) | self.aq_acquire('_setProductRegistryData')(type, tuple(values)) | def _manage_add_product_data(self, type, product, id, **data): values=filter( lambda d, product=product, id=id: not (d['product']==product and d['id']==id), list(self._getProductRegistryData(type)) ) | 54b2a83111b8a73d3b6de2c5e896c815dc3aa42e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/54b2a83111b8a73d3b6de2c5e896c815dc3aa42e/ProductRegistry.py |
self._getProductRegistryData(type) | self.aq_acquire('_getProductRegistryData')(type) | def _manage_remove_product_data(self, type, product, id): values=filter( lambda d, product=product, id=id: not (d['product']==product and d['id']==id), self._getProductRegistryData(type) ) | 54b2a83111b8a73d3b6de2c5e896c815dc3aa42e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/54b2a83111b8a73d3b6de2c5e896c815dc3aa42e/ProductRegistry.py |
self._setProductRegistryData(type, tuple(values)) | self.aq_acquire('_setProductRegistryData')(type, tuple(values)) | def _manage_remove_product_data(self, type, product, id): values=filter( lambda d, product=product, id=id: not (d['product']==product and d['id']==id), self._getProductRegistryData(type) ) | 54b2a83111b8a73d3b6de2c5e896c815dc3aa42e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/54b2a83111b8a73d3b6de2c5e896c815dc3aa42e/ProductRegistry.py |
expr = re.compile(r"'([%s%s%s\s]+)'[%s]+" % (letters, digits, literal_punc, phrase_delimiters)).search): | expr = re.compile(r"(\W+|^)'([%s%s%s\s]+)'([%s]+|$)" % (letters, digits, literal_punc, phrase_delimiters)).search,): | def doc_literal( self, s, expr = re.compile(r"'([%s%s%s\s]+)'[%s]+" % (letters, digits, literal_punc, phrase_delimiters)).search): | e1cb047fc51a61870e65b9df3b3e8db9c35b5b9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e1cb047fc51a61870e65b9df3b3e8db9c35b5b9b/DocumentClass.py |
r=expr(s) | r=expr(s) | def doc_literal( self, s, expr = re.compile(r"'([%s%s%s\s]+)'[%s]+" % (letters, digits, literal_punc, phrase_delimiters)).search): | e1cb047fc51a61870e65b9df3b3e8db9c35b5b9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e1cb047fc51a61870e65b9df3b3e8db9c35b5b9b/DocumentClass.py |
start, end = r.span(1) | start, end = r.span(2) | def doc_literal( self, s, expr = re.compile(r"'([%s%s%s\s]+)'[%s]+" % (letters, digits, literal_punc, phrase_delimiters)).search): | e1cb047fc51a61870e65b9df3b3e8db9c35b5b9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e1cb047fc51a61870e65b9df3b3e8db9c35b5b9b/DocumentClass.py |
if ts_reults: | if ts_results: | def parse(text, result=None, keys=None, unparmre=ts_regex.compile( '\([\0- ]*\([^\0- =\"]+\)\)'), parmre=ts_regex.compile( '\([\0- ]*\([^\0- =\"]+\)=\([^\0- =\"]+\)\)'), qparmre=ts_regex.compile( '\([\0- ]*\([^\0- =\"]+\)="\([^"]*\)\"\)'), ): if result is None: result = {} keys=[] __traceback_info__=text ts_results = parmre.match_group(text, (1,2,3)) if ts_results: start, grps = ts_results name=grps[1] value={'default':grps[2]} l=len(grps[0]) else: ts_results = qparmre.match_group(text, (1,2,3)) if ts_results: start, grps = ts_results name=grps[1] value={'default':grps[2]} l=len(grps[0]) else: ts_results = unparmre.match_group(text, (1,2)) if ts_reults: start, grps = ts_results name=grps[1] l=len(grps[0]) value={} else: if not text or not strip(text): return Args(result,keys) raise InvalidParameter, text lt=string.find(name,':') if lt > 0: value['type']=name[lt+1:] name=name[:lt] result[name]=value keys.append(name) return parse(text[l:],result,keys) | 2ae87f3c26d396bc3d9dafbdcc96c75dae0a8867 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2ae87f3c26d396bc3d9dafbdcc96c75dae0a8867/Aqueduct.py |
base_re=regex.compile('<base[\0- ]+[^>]+>\)', | base_re=regex.compile('\(<base[\0- ]+[^>]+>\)', | def insertBase(self, base_re=regex.compile('<base[\0- ]+[^>]+>\)', regex.casefold) ): if (self.headers.has_key('content-type') and self.headers['content-type']!='text/html'): return | af7d7e3b1921375d8482f539e510539fc403d745 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/af7d7e3b1921375d8482f539e510539fc403d745/Response.py |
return self._d | return self.__dict__['_d'] | def Destination(self): "Return the destination for factory output" return self._d | 7b5f59baab1e33430027de171d680d595f8f6645 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/7b5f59baab1e33430027de171d680d595f8f6645/FactoryDispatcher.py |
print "FAILED to write INFO event", event, ":", details | try: print "FAILED to write INFO event", event, ":", details except IOError: pass | def logmsg(self, event): # log a service event using servicemanager.LogMsg try: servicemanager.LogMsg(servicemanager.EVENTLOG_INFORMATION_TYPE, event, (self._svc_name_, " (%s)" % self._svc_display_name_)) except win32api.error, details: # Failed to write a log entry - most likely problem is # that the event log is full. We don't want this to kill us print "FAILED to write INFO event", event, ":", details | 6764040e16dd44a138cffda4f09e485907fb607a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6764040e16dd44a138cffda4f09e485907fb607a/service.py |
print "FAILED to write event log entry:", details print msg | try: print "FAILED to write event log entry:", details print msg except IOError: pass | def _dolog(self, func, msg): try: fullmsg = "%s (%s): %s" % \ (self._svc_name_, self._svc_display_name_, msg) func(fullmsg) except win32api.error, details: # Failed to write a log entry - most likely problem is # that the event log is full. We don't want this to kill us print "FAILED to write event log entry:", details print msg | 6764040e16dd44a138cffda4f09e485907fb607a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6764040e16dd44a138cffda4f09e485907fb607a/service.py |
self._v_f = None | self._v_ft = None | def __setstate__(self, state): Script.__setstate__(self, state) if (getattr(self, 'Python_magic', None) != Python_magic or getattr(self, 'Script_magic', None) != Script_magic): global _log_complaint if _log_complaint: LOG(self.meta_type, INFO, _log_complaint) _log_complaint = 0 # Changes here won't get saved, unless this Script is edited. body = self._body.rstrip() if body: self._body = body + '\n' self._compile() self._v_change = 1 elif self._code is None: self._v_f = None else: self._newfun(marshal.loads(self._code)) | c144bb987d038a283724bf3250093ff57030e624 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c144bb987d038a283724bf3250093ff57030e624/PythonScript.py |
self._v_f = None | self._v_ft = None | def _compile(self): r = self._compiler(self._params, self._body or 'pass', self.id, self.meta_type) code = r[0] errors = r[1] self.warnings = tuple(r[2]) if errors: self._code = None self._v_f = None self._setFuncSignature((), (), 0) # Fix up syntax errors. filestring = ' File "<string>",' for i in range(len(errors)): line = errors[i] if line.startswith(filestring): errors[i] = line.replace(filestring, ' Script', 1) self.errors = errors return | c144bb987d038a283724bf3250093ff57030e624 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c144bb987d038a283724bf3250093ff57030e624/PythonScript.py |
self._v_f = f = l.values()[0] | f = l.values()[0] self._v_ft = (f.func_code, g, f.func_defaults or ()) | def _newfun(self, code): g = {'__debug__': __debug__, '__builtins__': safe_builtins, '_getattr_': guarded_getattr, '_getitem_': guarded_getitem, '_write_': full_write_guard, '_print_': RestrictedPython.PrintCollector, } l = {} exec code in g, l self._v_f = f = l.values()[0] return f | c144bb987d038a283724bf3250093ff57030e624 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c144bb987d038a283724bf3250093ff57030e624/PythonScript.py |
if getattr(self, '_v_f', None) is not None: | if getattr(self, '_v_ft', None) is not None: | def _editedBindings(self): if getattr(self, '_v_f', None) is not None: self._makeFunction() | c144bb987d038a283724bf3250093ff57030e624 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c144bb987d038a283724bf3250093ff57030e624/PythonScript.py |
f = self._v_f if f is None: | ft = self._v_ft if ft is None: | def _exec(self, bound_names, args, kw): """Call a Python Script | c144bb987d038a283724bf3250093ff57030e624 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c144bb987d038a283724bf3250093ff57030e624/PythonScript.py |
f.func_globals.update(bound_names) f.func_globals['__traceback_supplement__'] = ( | g.update(bound_names) g['__traceback_supplement__'] = ( | def _exec(self, bound_names, args, kw): """Call a Python Script | c144bb987d038a283724bf3250093ff57030e624 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c144bb987d038a283724bf3250093ff57030e624/PythonScript.py |
try: r=apply(HTML.__call__, (self, client, REQUEST), kw) except: if self.id()=='standard_error_message': raise sys.exc_type, sys.exc_value, sys.exc_traceback error_type=sys.exc_type error_value=sys.exc_value if lower(error_type) in ('redirect',): raise error_type, error_value, sys.exc_traceback if regex.search('[a-zA-Z]>', error_value) > 0: error_message=error_value else: error_message='' tb=sys.exc_traceback error_tb=pretty_tb(error_type, error_value, tb) if client is not None: c=client else: c=self.aq_parent try: s=getattr(c, 'standard_error_message') v=HTML.__call__(s, c, REQUEST, error_type=error_type, error_value=error_value, error_tb=error_tb, error_traceback=error_tb, error_message=error_message) | try: try: r=apply(HTML.__call__, (self, client, REQUEST), kw) | def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw): | 52bf4e55adc9369965f39d74f97ad6431c7fdbf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/52bf4e55adc9369965f39d74f97ad6431c7fdbf3/Document.py |
v='Sorry, an error occured' sys.exc_traceback=tb tb=None raise error_type, v, sys.exc_traceback | if self.id()=='standard_error_message': raise sys.exc_type, sys.exc_value, sys.exc_traceback error_type=sys.exc_type error_value=sys.exc_value tb=sys.exc_traceback if lower(error_type) in ('redirect',): raise error_type, error_value, tb if (type(error_value) is type('') and regex.search('[a-zA-Z]>', error_value) > 0): error_message=error_value else: error_message='' error_tb=pretty_tb(error_type, error_value, tb) if client is not None: c=client else: c=self.aq_parent try: s=getattr(c, 'standard_error_message') v=HTML.__call__(s, c, REQUEST, error_type=error_type, error_value=error_value, error_tb=error_tb, error_traceback=error_tb, error_message=error_message) except: v='Sorry, an error occured' raise error_type, v, tb finally: tb=None | def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw): | 52bf4e55adc9369965f39d74f97ad6431c7fdbf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/52bf4e55adc9369965f39d74f97ad6431c7fdbf3/Document.py |
if action > 1 and not self.showtal: | if action == 1 or (action > 1 and not self.showtal): | def attrAction(self, item): name, value, action = item[:3] if action > 1 and not self.showtal: return 0, name, value ok = 1 if action == 2 and self.metal: i = rfind(name, ":") + 1 prefix, suffix = name[:i], name[i:] ##self.dumpMacroStack(prefix, suffix, value) what, macroName, slots = self.macroStack[-1] if suffix == "define-macro": if what == "use-macro": name = prefix + "use-macro" value = macroName else: assert what == "define-macro" i = self.macroContext("use-macro") if i >= 0: j = self.macroContext("define-slot") if j > i: name = prefix + "use-macro" else: return 0, name, value elif suffix == "define-slot": assert what == "define-slot" if self.macroContext("use-macro") >= 0: name = prefix + "fill-slot" | 82b0bb86e6f81f9beabaa8548ae58b04915ebc1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/82b0bb86e6f81f9beabaa8548ae58b04915ebc1c/TALInterpreter.py |
return self.manage_main(self,REQUEST,title=title,__str__=data, dtpref_cols=cols,dtpref_rows=rows) | return self.manage_main( self,REQUEST,title=title,__str__=self.quotedHTML(data), dtpref_cols=cols,dtpref_rows=rows) | def _er(self,data,title,SUBMIT,dtpref_cols,dtpref_rows,REQUEST): dr,dc = self._size_changes[SUBMIT] rows=max(1,atoi(dtpref_rows)+dr) cols=max(40,atoi(dtpref_cols)+dc) e='Friday, 31-Dec-99 23:59:59 GMT' resp=REQUEST['RESPONSE'] resp.setCookie('dtpref_rows',str(rows),path='/',expires=e) resp.setCookie('dtpref_cols',str(cols),path='/',expires=e) return self.manage_main(self,REQUEST,title=title,__str__=data, dtpref_cols=cols,dtpref_rows=rows) | 1f2a035920ee2b15861e22fcfdba3511318bdc60 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1f2a035920ee2b15861e22fcfdba3511318bdc60/Document.py |
""" Use zLOG """ | """ Use Zope logger""" | def output(self, text): print >>self.fp, '%s: %s' % (self._ident, text) | 0b587f20b30a4462b3b9b4c66ce4efb37f994c98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0b587f20b30a4462b3b9b4c66ce4efb37f994c98/ProgressHandler.py |
except: f=fver and (" (%s)" % fver) product=Product(name, 'Installed product %s%s' % (name,f)) | def initializeProduct(productp, name, home, app): # Initialize a levered product products=app.Control_Panel.Products if hasattr(productp, '__import_error__'): ie=productp.__import_error__ else: ie=None try: fver=strip(open(home+'/version.txt').read()) except: fver='' old=None try: if ihasattr(products,name): old=getattr(products, name) if (ihasattr(old,'version') and old.version==fver and hasattr(old, 'import_error_') and old.import_error_==ie): return old except: pass try: f=CompressedInputFile(open(home+'/product.dat','rb'),name+' shshsh') meta=cPickle.Unpickler(f).load() product=app._p_jar.importFile(f) product._objects=meta['_objects'] except: f=fver and (" (%s)" % fver) product=Product(name, 'Installed product %s%s' % (name,f)) if old is not None: app._manage_remove_product_meta_type(product) products._delObject(name) for id, v in old.objectValues(): try: product._setObject(id, v) except: pass products._setObject(name, product) #product.__of__(products)._postCopy(products) product.manage_options=Folder.manage_options product.icon='p_/InstalledProduct_icon' product.version=fver product._distribution=None product.manage_distribution=None product.thisIsAnInstalledProduct=1 if ie: product.import_error_=ie product.title='Broken product %s' % name product.icon='p_/BrokenProduct_icon' product.manage_options=( {'label':'Traceback', 'action':'manage_traceback'}, ) if os.path.exists(os.path.join(home, 'README.txt')): product.manage_options=product.manage_options+( {'label':'README', 'action':'manage_readme'}, ) return product | fd1b86e5b35e98c6097731c206ae86be092150fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fd1b86e5b35e98c6097731c206ae86be092150fe/Product.py |
|
' - %s [%s] "%s" %d %d "%s" "%s"\n' % ( | '- %s [%s] "%s" %d %d "%s" "%s"\n' % ( | def log (self, bytes): user_agent=self.get_header('user-agent') if not user_agent: user_agent='' referer=self.get_header('referer') if not referer: referer='' auth=self.get_header('Authorization') name='Anonymous' if auth is not None: if string.lower(auth[:6]) == 'basic ': try: decoded=base64.decodestring(auth[6:]) except base64.binascii.Error: decoded='' t = string.split(decoded, ':', 1) if len(t) < 2: name = 'Unknown (bad auth string)' else: name = t[0] | b069384f07bd48d218d939c275a3d5aa1793b9b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b069384f07bd48d218d939c275a3d5aa1793b9b6/http_server.py |
class ZopeEngine(ExpressionEngine): def getContext(self, contexts=None, **kwcontexts): if contexts is not None: if kwcontexts: kwcontexts.update(contexts) else: kwcontexts = contexts return ZopeContext(self, kwcontexts) | class ZopeEngine(zope.app.pagetemplate.engine.ZopeEngine): _create_context = ZopeContext | def translate(self, msgid, domain=None, mapping=None, default=None): context = self.contexts.get('context') return getGlobalTranslationService().translate( domain, msgid, mapping=mapping, context=context, default=default) | 7959d6c520a3dc7c73ac112f84ea656cd935b7f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/7959d6c520a3dc7c73ac112f84ea656cd935b7f3/Expressions.py |
if (headers is None) and (not content_type): raise 'Bad Request', 'No content type specified.' if headers and headers.has_key('content-type'): | data=(headers is None) and file or file.read() if headers and headers.has_key('content-type') and (not content_type): | def __init__(self, id, title, file, content_type='', precondition=''): self.__name__=id self.title=title self.precondition=precondition headers=hasattr(file, 'headers') and file.headers or None if (headers is None) and (not content_type): raise 'Bad Request', 'No content type specified.' if headers and headers.has_key('content-type'): content_type=headers['content-type'] if not content_type: raise 'Bad Request', 'No content type specified.' data=(headers is None) and file or file.read() self.update_data(data, content_type) | 451488562d4f0107b9b4afdf09fad4a3245ae359 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/451488562d4f0107b9b4afdf09fad4a3245ae359/Image.py |
raise 'Bad Request', 'No content type specified.' data=(headers is None) and file or file.read() | content_type, enc=mimetypes.guess_type(id) if not content_type: if content_types.find_binary(data) >= 0: content_type='application/octet-stream' else: content_type=content_types.text_type(data) content_type=string.lower(content_type) | def __init__(self, id, title, file, content_type='', precondition=''): self.__name__=id self.title=title self.precondition=precondition headers=hasattr(file, 'headers') and file.headers or None if (headers is None) and (not content_type): raise 'Bad Request', 'No content type specified.' if headers and headers.has_key('content-type'): content_type=headers['content-type'] if not content_type: raise 'Bad Request', 'No content type specified.' data=(headers is None) and file or file.read() self.update_data(data, content_type) | 451488562d4f0107b9b4afdf09fad4a3245ae359 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/451488562d4f0107b9b4afdf09fad4a3245ae359/Image.py |
if file.headers.has_key('content-type'): content_type=file.headers['content-type'] else: content_type=None self.update_data(file.read(), content_type) | headers=hasattr(file, 'headers') and file.headers or None data=(headers is None) and file or file.read() if headers and headers.has_key('content-type'): content_type=headers['content-type'] if not content_type: content_type, enc=mimetypes.guess_type(self.id()) if not content_type: if content_types.find_binary(data) >= 0: content_type='application/octet-stream' else: content_type=content_types.text_type(data) content_type=string.lower(content_type) self.update_data(data, content_type) | def manage_upload(self,file='',REQUEST=None): """ Replaces the current contents of the File or Image object with file. | 451488562d4f0107b9b4afdf09fad4a3245ae359 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/451488562d4f0107b9b4afdf09fad4a3245ae359/Image.py |
value = item[1] | value = evalue | 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 for item in attrList: name, value = item[:2] if len(item) > 2: try: action = self.actionIndex(item[2]) except ValueError: raise TALError, ('Error in TAL program', self.position) if not self.showtal and action > 1: continue if action <= 1 and self.tal: if self.html and string.lower(name) in BOOLEAN_HTML_ATTRS: evalue = self.engine.evaluateBoolean(item[3]) if evalue is self.CancelAction: if action == 1: # Cancelled insert continue elif not evalue: continue else: value = None else: evalue = self.engine.evaluateText(item[3]) if evalue is self.CancelAction: if action == 1: # Cancelled insert continue else: value = item[1] if value is None: continue elif (action == 2 and self.currentMacro and name[-13:] == ":define-macro" and self.metal): name = name[:-13] + ":use-macro" value = self.currentMacro if value is None: s = name else: s = "%s=%s" % (name, quote(value)) if (self.wrap and self.col >= align and self.col + 1 + len(s) > self.wrap): self.stream_write("\n" + " "*align + s) else: self.stream_write(" " + s) self.stream_write(end) | f582d2226cefdafa5a7560b1b7edfcc2d4b5a8bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f582d2226cefdafa5a7560b1b7edfcc2d4b5a8bf/TALInterpreter.py |
def info(self,t=None): idx=self.index(t)[0] zs =self.az[self.tinfo[idx][2]:] return self.tinfo[idx][0],self.tinfo[idx][1],zs[:find(zs,'\000')] | 7022d273bb89e85ec474617adce4dbf2d6a1746f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/7022d273bb89e85ec474617adce4dbf2d6a1746f/DateTime.py |
||
return map(lambda dict: dict.copy(), self._objects) | return tuple(map(lambda dict: dict.copy(), self._objects)) | def objectMap(self): # Return a tuple of mappings containing subobject meta-data return map(lambda dict: dict.copy(), self._objects) | 15cd27e621e744f4bf08b48c4e7e952efe41074a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/15cd27e621e744f4bf08b48c4e7e952efe41074a/ObjectManager.py |
def testResolveUrl(self): # Check that ResolveUrl really raises the same error | 55131695544fdda69d4380e399d5bd23590346e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/55131695544fdda69d4380e399d5bd23590346e1/testHTTPRequest.py |
||
from zExceptions import NotFound env = TEST_ENVIRON.copy() req = HTTPRequest(None, env, None) req['PARENTS'] = ['Nobody', 'cares', 'here'] testmethod = req.resolve_url self.assertRaises(NotFound, testmethod, 'http://localhost/does_not_exist') | from zExceptions import NotFound env = TEST_ENVIRON.copy() req = HTTPRequest(None, env, None) req['PARENTS'] = ['Nobody', 'cares', 'here'] testmethod = req.resolve_url self.assertRaises(NotFound, testmethod, 'http://localhost/does_not_exist') | def testResolveUrl(self): # Check that ResolveUrl really raises the same error | 55131695544fdda69d4380e399d5bd23590346e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/55131695544fdda69d4380e399d5bd23590346e1/testHTTPRequest.py |
def test_csv_table_file_option_raise(self): | def test_csv_table_url_option_raise(self): | def test_csv_table_file_option_raise(self): | 0a97af04b3105c869ee2d94211d05db450092921 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0a97af04b3105c869ee2d94211d05db450092921/testReST.py |
tname, args, section = blocks[0] | tname, args, section = blocks[-1] | def __init__(self, blocks): | 03e63f496b8564e77c6fbaa371f99fc1a013c90c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/03e63f496b8564e77c6fbaa371f99fc1a013c90c/DT_If.py |
raise (ValueError, 'The object with the id "%s" does not exist.' % id) | raise ValueError('The object with the id "%s" does not exist.' % id) | def moveObjectsByDelta(self, ids, delta): """ Move specified sub-objects by delta. """ if type(ids) is StringType: ids = (ids,) min_position = 0 objects = list(self._objects) obj_dict = {} for obj in self._objects: obj_dict[ obj['id'] ] = obj # unify moving direction if delta > 0: ids = list(ids) ids.reverse() objects.reverse() counter = 0 | cd94425e8d044a58ac59446eb695d964e15d82c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/cd94425e8d044a58ac59446eb695d964e15d82c9/OrderSupport.py |
raise ValueError, 'The object with the id "%s" does not exist.' % id | raise ValueError('The object with the id "%s" does not exist.' % id) | def getObjectPosition(self, id): """ Get the position of an object by its id. """ ids = self.objectIds() if id in ids: return ids.index(id) raise ValueError, 'The object with the id "%s" does not exist.' % id | cd94425e8d044a58ac59446eb695d964e15d82c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/cd94425e8d044a58ac59446eb695d964e15d82c9/OrderSupport.py |
base=find_class(self, b) bases.append(base) | raise 'Invalid class', b | def manage_addZClass(self, id, title='', baseclasses=[], meta_type='', CreateAFactory=0, REQUEST=None, zope_object=0): """Add a Z Class """ bases=[] for b in baseclasses: if Products.meta_classes.has_key(b): bases.append(Products.meta_classes[b]) else: base=find_class(self, b) bases.append(base) Z=ZClass(id, title, bases, zope_object=zope_object) if meta_type: Z._zclass_.meta_type=meta_type self._setObject(id, Z) if CreateAFactory and meta_type: self.manage_addDTMLMethod( id+'_addForm', id+' constructor input form', addFormDefault % {'id': id, 'meta_type': meta_type}, ) self.manage_addDTMLMethod( id+'_add', id+' constructor', addDefault % {'id': id}, ) self.manage_addPermission( id+'_add_permission', id+' constructor permission', 'Add %ss' % meta_type ) self.manage_addPrincipiaFactory( id+'_factory', id+' factory', meta_type, id+'_addForm', 'Add %ss' % meta_type ) Z=self._getOb(id) Z.propertysheets.permissions.manage_edit( selected=['Add %ss' % id]) Z.manage_setPermissionMapping( permission_names=['Create class instances'], class_permissions=['Add %ss' % meta_type] ) if REQUEST is not None: return self.manage_main(self,REQUEST, update_menu=1) | fb1b39c9b03ed638e715aa3ed10bdc8cc6b187dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fb1b39c9b03ed638e715aa3ed10bdc8cc6b187dc/ZClass.py |
if meta_type: Z._zclass_.meta_type=meta_type | Z._zclass_.meta_type=meta_type | def manage_addZClass(self, id, title='', baseclasses=[], meta_type='', CreateAFactory=0, REQUEST=None, zope_object=0): """Add a Z Class """ bases=[] for b in baseclasses: if Products.meta_classes.has_key(b): bases.append(Products.meta_classes[b]) else: base=find_class(self, b) bases.append(base) Z=ZClass(id, title, bases, zope_object=zope_object) if meta_type: Z._zclass_.meta_type=meta_type self._setObject(id, Z) if CreateAFactory and meta_type: self.manage_addDTMLMethod( id+'_addForm', id+' constructor input form', addFormDefault % {'id': id, 'meta_type': meta_type}, ) self.manage_addDTMLMethod( id+'_add', id+' constructor', addDefault % {'id': id}, ) self.manage_addPermission( id+'_add_permission', id+' constructor permission', 'Add %ss' % meta_type ) self.manage_addPrincipiaFactory( id+'_factory', id+' factory', meta_type, id+'_addForm', 'Add %ss' % meta_type ) Z=self._getOb(id) Z.propertysheets.permissions.manage_edit( selected=['Add %ss' % id]) Z.manage_setPermissionMapping( permission_names=['Create class instances'], class_permissions=['Add %ss' % meta_type] ) if REQUEST is not None: return self.manage_main(self,REQUEST, update_menu=1) | fb1b39c9b03ed638e715aa3ed10bdc8cc6b187dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fb1b39c9b03ed638e715aa3ed10bdc8cc6b187dc/ZClass.py |
def manage_subclassableClassNames(self): r={} r.update(Products.meta_class_info) while 1: if not hasattr(self, 'objectItems'): break for k, v in self.objectItems(): if hasattr(v,'_zclass_') and not r.has_key(k): r[k]=v.title_and_id() if not hasattr(self, 'aq_parent'): break self=self.aq_parent r=r.items() r.sort() return r | def manage_addZClass(self, id, title='', baseclasses=[], meta_type='', CreateAFactory=0, REQUEST=None, zope_object=0): """Add a Z Class """ bases=[] for b in baseclasses: if Products.meta_classes.has_key(b): bases.append(Products.meta_classes[b]) else: base=find_class(self, b) bases.append(base) Z=ZClass(id, title, bases, zope_object=zope_object) if meta_type: Z._zclass_.meta_type=meta_type self._setObject(id, Z) if CreateAFactory and meta_type: self.manage_addDTMLMethod( id+'_addForm', id+' constructor input form', addFormDefault % {'id': id, 'meta_type': meta_type}, ) self.manage_addDTMLMethod( id+'_add', id+' constructor', addDefault % {'id': id}, ) self.manage_addPermission( id+'_add_permission', id+' constructor permission', 'Add %ss' % meta_type ) self.manage_addPrincipiaFactory( id+'_factory', id+' factory', meta_type, id+'_addForm', 'Add %ss' % meta_type ) Z=self._getOb(id) Z.propertysheets.permissions.manage_edit( selected=['Add %ss' % id]) Z.manage_setPermissionMapping( permission_names=['Create class instances'], class_permissions=['Add %ss' % meta_type] ) if REQUEST is not None: return self.manage_main(self,REQUEST, update_menu=1) | fb1b39c9b03ed638e715aa3ed10bdc8cc6b187dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fb1b39c9b03ed638e715aa3ed10bdc8cc6b187dc/ZClass.py |
|
product=self.aq_inner.aq_parent.id, | product=product, | def _register(self): | fb1b39c9b03ed638e715aa3ed10bdc8cc6b187dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fb1b39c9b03ed638e715aa3ed10bdc8cc6b187dc/ZClass.py |
product=self.aq_inner.aq_parent.id, | product=product, | def _unregister(self): | fb1b39c9b03ed638e715aa3ed10bdc8cc6b187dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fb1b39c9b03ed638e715aa3ed10bdc8cc6b187dc/ZClass.py |
singledots=re.compile('^\.$') | singledots=re.compile('^\.$', re.M) | def Send(host, port, localhost, timeout, from_, to, subject, body): SendMail(host, port, localhost, timeout).send(from_, to, subject, body) | 1fb42a5fac5e80af13c67520bdc4b3d91fa31b31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1fb42a5fac5e80af13c67520bdc4b3d91fa31b31/MailHost.py |
if code > 400: | if code > 400: | def _check(self, lev='250'): line = self.getLine() if not line: return 0 try: code=string.atoi(line[:3]) except: raise smtpError, \ "Cannot convert line from SMTP: %s" % line if code > 400: # my change... raise smtpError, \ "Recieved error code %s from SMTP: %s"\ % (code, line) return 1 | 1fb42a5fac5e80af13c67520bdc4b3d91fa31b31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1fb42a5fac5e80af13c67520bdc4b3d91fa31b31/MailHost.py |
replace=string.replace | bfile = StringIO(body) mo=rfc822.Message(bfile) for k, v in mo.items(): self.conn.send('%s: %s\015\012' % (string.capitalize(k), v)) if not mo.has_key('Mime-Version'): self.conn.send('Mime-Version: 1.0\015\012') if not mo.has_key('Content-Type'): self.conn.send( 'Content-Type: text/plain; charset="iso-8859-1"\015\012') if not mo.has_key('Content-Transfer-Encoding'): self.conn.send( 'Content-Transfer-Encoding: quoted-printable\015\012') self.conn.send('\015\012') body=bfile.read() | def send(self, mfrom, mto, subj='No Subject', body='Blank Message'): self.conn.send("mail from:<%s>\015\012" % mfrom) self._check() if type(mto) in [types.ListType, types.TupleType]: for person in mto: self.conn.send("rcpt to:<%s>\015\012" % person) self._check() else: self.conn.send("rcpt to:<%s>\015\012" % mto) self._check() self.conn.send("data\015\012") self._check() replace=string.replace body=self.singledots.sub('..', body) body=replace(body, '\r\n', '\n') body=replace(body, '\r', '\n') | 1fb42a5fac5e80af13c67520bdc4b3d91fa31b31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1fb42a5fac5e80af13c67520bdc4b3d91fa31b31/MailHost.py |
body=replace(body, '\r\n', '\n') body=replace(body, '\r', '\n') body=replace(body, '\n', '\015\012') | body=string.replace(body, '\r\n', '\n') body=string.replace(body, '\r', '\n') body=encode(body, 0) body=string.replace(body, '\n', '\015\012') | def send(self, mfrom, mto, subj='No Subject', body='Blank Message'): self.conn.send("mail from:<%s>\015\012" % mfrom) self._check() if type(mto) in [types.ListType, types.TupleType]: for person in mto: self.conn.send("rcpt to:<%s>\015\012" % person) self._check() else: self.conn.send("rcpt to:<%s>\015\012" % mto) self._check() self.conn.send("data\015\012") self._check() replace=string.replace body=self.singledots.sub('..', body) body=replace(body, '\r\n', '\n') body=replace(body, '\r', '\n') | 1fb42a5fac5e80af13c67520bdc4b3d91fa31b31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1fb42a5fac5e80af13c67520bdc4b3d91fa31b31/MailHost.py |
$Id: Publish.py,v 1.7 1996/07/11 19:39:07 jfulton Exp $""" | $Id: Publish.py,v 1.8 1996/07/18 14:59:54 jfulton Exp $""" | def taste(spam): "a favorable reviewer" return spam,'yum yum, I like ' + spam | 1c1d91866e49c515300bd2f393213fcae1502569 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1c1d91866e49c515300bd2f393213fcae1502569/Publish.py |
__version__='$Revision: 1.7 $'[11:-2] | __version__='$Revision: 1.8 $'[11:-2] | def taste(spam): "a favorable reviewer" return spam,'yum yum, I like ' + spam | 1c1d91866e49c515300bd2f393213fcae1502569 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1c1d91866e49c515300bd2f393213fcae1502569/Publish.py |
object=getattr(dict,published) | object=getattr(theModule,published) | def publish(self, module_name, published='web_objects', | 1c1d91866e49c515300bd2f393213fcae1502569 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1c1d91866e49c515300bd2f393213fcae1502569/Publish.py |
if not path: path = ['help'] | try: doc=object.__doc__ except: try: doc=object['__doc__'] except: doc=None if not path: for entry_name in 'index_html', 'index.html': try: if hasattr(object,entry_name): path=[entry_name] break except: pass try: if object.has_key(entry_name): path=[entry_name] break except: pass if not path: path = ['help'] | def publish(self, module_name, published='web_objects', | 1c1d91866e49c515300bd2f393213fcae1502569 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1c1d91866e49c515300bd2f393213fcae1502569/Publish.py |
self._setObject('UserFolder', i) | self._setObject('acl_users', i) | def manage_addUserFolder(self,dtself,REQUEST): """ """ i=UserFolder() i._init() self._setObject('UserFolder', i) self.__allow_groups__=self.UserFolder return self.manage_main(self,REQUEST) | 972fd2ebc63955318bf465c81c25667930635b2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/972fd2ebc63955318bf465c81c25667930635b2e/User.py |
print '+2' | def save_tuple(self, object): | 5c9c0885f57d6fabe4a0ad1de6a5c1dd1b424c61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/5c9c0885f57d6fabe4a0ad1de6a5c1dd1b424c61/pickle.py |
|
print '+3' | def save_tuple(self, object): | 5c9c0885f57d6fabe4a0ad1de6a5c1dd1b424c61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/5c9c0885f57d6fabe4a0ad1de6a5c1dd1b424c61/pickle.py |
|
args = getattr(getattr(meth, 'func_code', None), 'co_argcount', 2) | args = getattr(getattr(aq_base(meth), 'func_code', None), 'co_argcount', 2) | def __call__(self, container, request): try: meth = getattr(container, self.name) except AttributeError: return | c89b794c286f34a305a0b27bfb69aa74bb511bbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c89b794c286f34a305a0b27bfb69aa74bb511bbc/BeforeTraverse.py |
'''Calls the script. ''' | '''Calls the script.''' | def __call__(self, *args, **kw): '''Calls the script. ''' return self._bindAndExec(args, kw, None) | 9927173e0ca9123a4fe07d9d65477109d6aa6853 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9927173e0ca9123a4fe07d9d65477109d6aa6853/Bindings.py |
$Id: Publish.py,v 1.6 1996/07/10 22:53:54 jfulton Exp $""" | $Id: Publish.py,v 1.7 1996/07/11 19:39:07 jfulton Exp $""" | def taste(spam): "a favorable reviewer" return spam,'yum yum, I like ' + spam | 1643f4b45d7592ed4f5e190ab9de17319a9a2832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1643f4b45d7592ed4f5e190ab9de17319a9a2832/Publish.py |
__version__='$Revision: 1.6 $'[11:-2] | __version__='$Revision: 1.7 $'[11:-2] | def taste(spam): "a favorable reviewer" return spam,'yum yum, I like ' + spam | 1643f4b45d7592ed4f5e190ab9de17319a9a2832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1643f4b45d7592ed4f5e190ab9de17319a9a2832/Publish.py |
if not hasattr(object, 'aq_parent'): break object=object.aq_parent | if hasattr(object, 'aq_parent'): object=object.aq_parent continue if hasattr(object, 'im_self'): object=object.im_self continue break | def getRolesInContext(self, object): """Return the list of roles assigned to the user, including local roles assigned in context of the passed in object.""" name=self.getUserName() roles=self.getRoles() local={} while 1: if hasattr(object, '__ac_local_roles__'): dict=object.__ac_local_roles__ or {} for r in dict.get(name, []): local[r]=1 if not hasattr(object, 'aq_parent'): break object=object.aq_parent joined=rolejoin(roles, local.keys()) return joined | bed443bbdc9b0de26e3221a8dc99f3fc2bb98f13 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/bed443bbdc9b0de26e3221a8dc99f3fc2bb98f13/User.py |
finished = {} | finished = [] | def analyze(f, top, sortf, start=None, end=None, mode='cumulative'): beginrequests = {} cumulative = {} finished = {} unfinished = {} while 1: line = f.readline() if not line: break line = string.strip(line) tup = parsebigmlogline(line) if tup is None: print "Could not interpret line: %s" % line continue code, id, timestr, desc = tup timestr = string.strip(timestr) fromepoch = getdate(timestr) if start is not None and fromepoch < start: continue if end is not None and fromepoch > end: break request = unfinished.get(id) if request is None: if code != "B": continue # garbage at beginning of file request = Request() unfinished[id] = request request.put(code, int(fromepoch), desc) if request.isfinished(): del unfinished[id] finished[id] = request request.active = len(unfinished) finished.update(unfinished) requests = finished.values() if mode == 'cumulative': for request in requests: url = request.url stats = cumulative.get(url) if stats is None: stats = Cumulative(url) cumulative[url] = stats stats.put(request) cumulative = cumulative.values() if mode == 'cumulative': dict = cumulative elif mode == 'detailed': dict = requests else: raise "Invalid mode." dict.sort(sortf) write(dict, top) | c648c5bbce99b81bc4eb3d9d537b410d346db716 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c648c5bbce99b81bc4eb3d9d537b410d346db716/requestprofiler.py |
finished[id] = request | finished.append(request) | def analyze(f, top, sortf, start=None, end=None, mode='cumulative'): beginrequests = {} cumulative = {} finished = {} unfinished = {} while 1: line = f.readline() if not line: break line = string.strip(line) tup = parsebigmlogline(line) if tup is None: print "Could not interpret line: %s" % line continue code, id, timestr, desc = tup timestr = string.strip(timestr) fromepoch = getdate(timestr) if start is not None and fromepoch < start: continue if end is not None and fromepoch > end: break request = unfinished.get(id) if request is None: if code != "B": continue # garbage at beginning of file request = Request() unfinished[id] = request request.put(code, int(fromepoch), desc) if request.isfinished(): del unfinished[id] finished[id] = request request.active = len(unfinished) finished.update(unfinished) requests = finished.values() if mode == 'cumulative': for request in requests: url = request.url stats = cumulative.get(url) if stats is None: stats = Cumulative(url) cumulative[url] = stats stats.put(request) cumulative = cumulative.values() if mode == 'cumulative': dict = cumulative elif mode == 'detailed': dict = requests else: raise "Invalid mode." dict.sort(sortf) write(dict, top) | c648c5bbce99b81bc4eb3d9d537b410d346db716 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c648c5bbce99b81bc4eb3d9d537b410d346db716/requestprofiler.py |
finished.update(unfinished) requests = finished.values() | finished.extend(unfinished.values()) requests = finished | def analyze(f, top, sortf, start=None, end=None, mode='cumulative'): beginrequests = {} cumulative = {} finished = {} unfinished = {} while 1: line = f.readline() if not line: break line = string.strip(line) tup = parsebigmlogline(line) if tup is None: print "Could not interpret line: %s" % line continue code, id, timestr, desc = tup timestr = string.strip(timestr) fromepoch = getdate(timestr) if start is not None and fromepoch < start: continue if end is not None and fromepoch > end: break request = unfinished.get(id) if request is None: if code != "B": continue # garbage at beginning of file request = Request() unfinished[id] = request request.put(code, int(fromepoch), desc) if request.isfinished(): del unfinished[id] finished[id] = request request.active = len(unfinished) finished.update(unfinished) requests = finished.values() if mode == 'cumulative': for request in requests: url = request.url stats = cumulative.get(url) if stats is None: stats = Cumulative(url) cumulative[url] = stats stats.put(request) cumulative = cumulative.values() if mode == 'cumulative': dict = cumulative elif mode == 'detailed': dict = requests else: raise "Invalid mode." dict.sort(sortf) write(dict, top) | c648c5bbce99b81bc4eb3d9d537b410d346db716 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c648c5bbce99b81bc4eb3d9d537b410d346db716/requestprofiler.py |
transaction().abort() | transaction.abort() | def install_product(app, product_dir, product_name, meta_types, folder_permissions, raise_exc=0, log_exc=1): path_join=os.path.join isdir=os.path.isdir exists=os.path.exists global_dict=globals() silly=('__doc__',) if 1: # Preserve indentation for diff :-) package_dir=path_join(product_dir, product_name) __traceback_info__=product_name if not isdir(package_dir): return if not exists(path_join(package_dir, '__init__.py')): if not exists(path_join(package_dir, '__init__.pyc')): if not exists(path_join(package_dir, '__init__.pyo')): return try: product=__import__("Products.%s" % product_name, global_dict, global_dict, silly) # Install items into the misc_ namespace, used by products # and the framework itself to store common static resources # like icon images. misc_=pgetattr(product, 'misc_', {}) if misc_: if isinstance(misc_, dict): misc_=Misc_(product_name, misc_) Application.misc_.__dict__[product_name]=misc_ # Here we create a ProductContext object which contains # information about the product and provides an interface # for registering things like classes and help topics that # should be associated with that product. Products are # expected to implement a method named 'initialize' in # their __init__.py that takes the ProductContext as an # argument. productObject=App.Product.initializeProduct( product, product_name, package_dir, app) context=ProductContext(productObject, app, product) # Look for an 'initialize' method in the product. If it does # not exist, then this is an old product that has never been # updated. In that case, we will analyze the product and # build up enough information to do initialization manually. initmethod=pgetattr(product, 'initialize', None) if initmethod is not None: initmethod(context) # Support old-style product metadata. Older products may # define attributes to name their permissions, meta_types, # constructors, etc. permissions={} new_permissions={} if pgetattr(product, '__ac_permissions__', None) is not None: warn('__init__.py of %s has a long deprecated ' '\'__ac_permissions__\' attribute. ' '\'__ac_permissions__\' will be ignored by ' 'install_product in Zope 2.10. Please use registerClass ' 'instead.' % product.__name__, DeprecationWarning) for p in pgetattr(product, '__ac_permissions__', ()): permission, names, default = ( tuple(p)+('Manager',))[:3] if names: for name in names: permissions[name]=permission elif not folder_permissions.has_key(permission): new_permissions[permission]=() if pgetattr(product, 'meta_types', None) is not None: warn('__init__.py of %s has a long deprecated \'meta_types\' ' 'attribute. \'meta_types\' will be ignored by ' 'install_product in Zope 2.10. Please use registerClass ' 'instead.' % product.__name__, DeprecationWarning) for meta_type in pgetattr(product, 'meta_types', ()): # Modern product initialization via a ProductContext # adds 'product' and 'permission' keys to the meta_type # mapping. We have to add these here for old products. pname=permissions.get(meta_type['action'], None) if pname is not None: meta_type['permission']=pname meta_type['product']=productObject.id meta_type['visibility'] = 'Global' meta_types.append(meta_type) if pgetattr(product, 'methods', None) is not None: warn('__init__.py of %s has a long deprecated \'methods\' ' 'attribute. \'methods\' will be ignored by ' 'install_product in Zope 2.10. Please use registerClass ' 'instead.' % product.__name__, DeprecationWarning) for name,method in pgetattr( product, 'methods', {}).items(): if not hasattr(Folder.Folder, name): setattr(Folder.Folder, name, method) if name[-9:]!='__roles__': # not Just setting roles if (permissions.has_key(name) and not folder_permissions.has_key( permissions[name])): permission=permissions[name] if new_permissions.has_key(permission): new_permissions[permission].append(name) else: new_permissions[permission]=[name] if new_permissions: new_permissions=new_permissions.items() for permission, names in new_permissions: folder_permissions[permission]=names new_permissions.sort() Folder.Folder.__ac_permissions__=tuple( list(Folder.Folder.__ac_permissions__)+new_permissions) if not doInstall(): transaction().abort() else: transaction.get().note('Installed product '+product_name) transaction.commit() except: if log_exc: LOG('Zope',ERROR,'Couldn\'t install %s' % product_name, error=sys.exc_info()) transaction.abort() if raise_exc: raise | 19c979cb953bd62708abecdf475a72f64e3992f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/19c979cb953bd62708abecdf475a72f64e3992f0/Application.py |
def structure(list): if not list: return [] i=0 l=len(list) r=[] while i < l: sublen=paragraphs(list,i) i=i+1 r.append((list[i-1][1],structure(list[i:i+sublen]))) i=i+sublen return r | e2ca996b83aa8a1314e6d37ecf62b36c697529c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e2ca996b83aa8a1314e6d37ecf62b36c697529c8/ClassicStructuredText.py |
||
td_reg=re.compile(r'[ \t\n]*\|\|([^\0x00|]*)') | td_reg=re.compile(r'[ \t\n]*\|\|([^\0|]*)') | def create(self,aPar, td_reg=re.compile(r'[ \t\n]*\|\|([^\0x00|]*)') ): '''parses a table and returns nested list representing the table''' self.table=[] text=filter(None,aPar.split('\n')) for line in text: row=[] while 1: mo = td_reg.match(line) if not mo: return 0 pos = mo.end(1) row.append(mo.group(1)) if pos==len(line):break line=line[pos:] self.table.append(row) return 1 | e2ca996b83aa8a1314e6d37ecf62b36c697529c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e2ca996b83aa8a1314e6d37ecf62b36c697529c8/ClassicStructuredText.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 ) | 4384fcacfc1adb868f652d042e817630a351309f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4384fcacfc1adb868f652d042e817630a351309f/testCopySupport.py |
rc=referenceCount_get(roid, 0) | rc=referenceCount_get(roid, 0) - 1 | def _takeOutGarbage(self, oid): # take out the garbage. referenceCount=self._referenceCount referenceCount_get=referenceCount.get | 9344f756c077685ebb6ccfcf15862a07a15acafd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9344f756c077685ebb6ccfcf15862a07a15acafd/TemporaryStorage.py |
referenceCount[roid] = rc - 1 | referenceCount[roid] = rc | def _takeOutGarbage(self, oid): # take out the garbage. referenceCount=self._referenceCount referenceCount_get=referenceCount.get | 9344f756c077685ebb6ccfcf15862a07a15acafd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9344f756c077685ebb6ccfcf15862a07a15acafd/TemporaryStorage.py |
status = _("An error occured.") | status = _("An error occurred.") | def update(self): if self.update_status is not None: # We've been called before. Just return the status we previously # computed. return self.update_status | 1b0ea5b194f079b81ab5a916a4460e2d84c09d0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1b0ea5b194f079b81ab5a916a4460e2d84c09d0d/__init__.py |
self.update_status = _("An error occured.") | self.update_status = _("An error occurred.") | def update(self): if self.update_status is not None: # We've been called before. Just return the previous result. return self.update_status | 1b0ea5b194f079b81ab5a916a4460e2d84c09d0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1b0ea5b194f079b81ab5a916a4460e2d84c09d0d/__init__.py |
if not isInContext(ucontext, object): | if not object.aq_inContextOf(ucontext, 1): | def allowed(self, object, object_roles=None): """Check whether the user has access to object, assuming that object.__roles__ is the given roles.""" if object_roles is None or 'Anonymous' in object_roles: return 1 usr_roles=self.getRolesInContext(object) for role in object_roles: if role in usr_roles: # The user apparently has one of the necessary # roles, but first make sure the object exists # in the context of the parent of the acl_users # folder. ufolder = getattr(self, 'aq_parent', None) ucontext = getattr(ufolder, 'aq_parent', None) if ucontext is not None: if object is None: # This is a strange rule, though # it doesn't cause any security holes. SDH return 1 if not hasattr(object, 'aq_inContextOf'): if hasattr(object, 'im_self'): # This is a method. Grab its self. object=object.im_self if not hasattr(object, 'aq_inContextOf'): # object is not wrapped, therefore we # can't determine context. # Fail the access attempt. Otherwise # this would be a security hole. return None # ----------------------------------------------------- # FIXME: this is a workaround for broken aq_inContextOf # ----------------------------------------------------- # if not object.aq_inContextOf(ucontext, 1): if not isInContext(ucontext, object): if 'Shared' in object_roles: # Damn, old role setting. Waaa object_roles=self._shared_roles(object) if 'Anonymous' in object_roles: return 1 return None | 58021892e8664d71171fb34bf91ac294d46233a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/58021892e8664d71171fb34bf91ac294d46233a5/User.py |
from Acquisition import aq_base, aq_inner, aq_parent def isInContext(fixed, variable): fixed = aq_base(fixed) while variable is not None: v = aq_base(variable) if v is fixed: return 1 variable = aq_parent(aq_inner(variable)) return 0 | def reqattr(request, attr): try: return request[attr] except: return None | 58021892e8664d71171fb34bf91ac294d46233a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/58021892e8664d71171fb34bf91ac294d46233a5/User.py |
|
expr=re.compile(r"\_([%s0-9\s\.,\?]+)\_" % letters).search): | expr=re.compile(r"\s*\_([%s0-9\s\.,\?]+)\_" % letters).search): | def doc_underline(self, s, expr=re.compile(r"\_([%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 | 299c6e4135a0014bf9f477e36975426d500bae82 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/299c6e4135a0014bf9f477e36975426d500bae82/DocumentClass.py |
def manage_addZCatalog(self, id, title, vocab='', vocab_id='', REQUEST=None): | def manage_addZCatalog(self,id,title,REQUEST=None): | def manage_addZCatalog(self, id, title, vocab='', vocab_id='', REQUEST=None): """Add a ZCatalog object """ c=ZCatalog(id, title, vocab, vocab_id, self) self._setObject(id, c) if REQUEST is not None: return self.manage_main(self, REQUEST) | 9191c0170a4ef0cccfe160ebdcc05200f4be1661 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9191c0170a4ef0cccfe160ebdcc05200f4be1661/ZCatalog.py |
c=ZCatalog(id, title, vocab, vocab_id, self) self._setObject(id, c) | c=ZCatalog(id,title) self._setObject(id,c) | def manage_addZCatalog(self, id, title, vocab='', vocab_id='', REQUEST=None): """Add a ZCatalog object """ c=ZCatalog(id, title, vocab, vocab_id, self) self._setObject(id, c) if REQUEST is not None: return self.manage_main(self, REQUEST) | 9191c0170a4ef0cccfe160ebdcc05200f4be1661 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9191c0170a4ef0cccfe160ebdcc05200f4be1661/ZCatalog.py |
return self.manage_main(self, REQUEST) def VocabularyIDs(self): """ returns a list of acquireable vocabularies. Stole this from ZSQLMethods """ ids={} have_id=ids.has_key StringType=type('') while self is not None: if hasattr(self, 'objectValues'): for o in self.objectValues(): if (hasattr(o,'_isAVocabulary') and o._isAVocabulary and hasattr(o,'id')): id=o.id if type(id) is not StringType: id=id() if not have_id(id): if hasattr(o,'title_and_id'): o=o.title_and_id() else: o=id ids[id]=id if hasattr(self, 'aq_parent'): self=self.aq_parent else: self=None ids=map(lambda item: (item[1], item[0]), ids.items()) ids.sort() return ids | return self.manage_main(self,REQUEST) | def manage_addZCatalog(self, id, title, vocab='', vocab_id='', REQUEST=None): """Add a ZCatalog object """ c=ZCatalog(id, title, vocab, vocab_id, self) self._setObject(id, c) if REQUEST is not None: return self.manage_main(self, REQUEST) | 9191c0170a4ef0cccfe160ebdcc05200f4be1661 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9191c0170a4ef0cccfe160ebdcc05200f4be1661/ZCatalog.py |
_v_vocabulary = None def __init__(self, id, title='', vocab=0, vocab_id='', container=None): | def __init__(self,id,title=''): | def VocabularyIDs(self): """ returns a list of acquireable vocabularies. Stole this from ZSQLMethods """ ids={} have_id=ids.has_key StringType=type('') while self is not None: if hasattr(self, 'objectValues'): for o in self.objectValues(): if (hasattr(o,'_isAVocabulary') and o._isAVocabulary and hasattr(o,'id')): id=o.id if type(id) is not StringType: id=id() if not have_id(id): if hasattr(o,'title_and_id'): o=o.title_and_id() else: o=id ids[id]=id if hasattr(self, 'aq_parent'): self=self.aq_parent else: self=None ids=map(lambda item: (item[1], item[0]), ids.items()) ids.sort() return ids | 9191c0170a4ef0cccfe160ebdcc05200f4be1661 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9191c0170a4ef0cccfe160ebdcc05200f4be1661/ZCatalog.py |
self.vocab_id = vocab_id | def __init__(self, id, title='', vocab=0, vocab_id='', container=None): self.id=id self.title=title self.vocab_id = vocab_id self.threshold = 10000 self._v_total = 0 | 9191c0170a4ef0cccfe160ebdcc05200f4be1661 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9191c0170a4ef0cccfe160ebdcc05200f4be1661/ZCatalog.py |
|
if not vocab: v = Vocabulary('Vocabulary', 'Vocabulary', globbing=1) self._setObject('Vocabulary', v) v = 'Vocabulary' else: v = vocab_id self._catalog = Catalog(vocabulary=v) | self._catalog = Catalog() | def __init__(self, id, title='', vocab=0, vocab_id='', container=None): self.id=id self.title=title self.vocab_id = vocab_id self.threshold = 10000 self._v_total = 0 | 9191c0170a4ef0cccfe160ebdcc05200f4be1661 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9191c0170a4ef0cccfe160ebdcc05200f4be1661/ZCatalog.py |
self._catalog.addColumn('absolute_url') self._catalog.addIndex('absolute_url', 'FieldIndex') def getVocabulary(self): """ more ack! """ return getattr(self, self.vocab_id) | def __init__(self, id, title='', vocab=0, vocab_id='', container=None): self.id=id self.title=title self.vocab_id = vocab_id self.threshold = 10000 self._v_total = 0 | 9191c0170a4ef0cccfe160ebdcc05200f4be1661 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9191c0170a4ef0cccfe160ebdcc05200f4be1661/ZCatalog.py |
|
def catalog_object(self, obj, uid): """ wrapper around catalog """ self._v_total = (self._v_total + self._catalog.catalogObject(obj, uid, self.threshold)) | 9191c0170a4ef0cccfe160ebdcc05200f4be1661 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9191c0170a4ef0cccfe160ebdcc05200f4be1661/ZCatalog.py |
||
for b in klass.__bases__: _ii(b) | for b in klass.__bases__: _ii(b, items) | def _ii(klass, items): for k, v in klass.__dict__.items(): if type(v) is not FunctionType or not v.__doc__: continue if k[:1]=='_' and not (k[:2]=='__' and k[-2:]=='__'): continue items[k]=v for b in klass.__bases__: _ii(b) return items | 942b9c9604a1ce9b58941c43d903e1fe7317936f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/942b9c9604a1ce9b58941c43d903e1fe7317936f/Util.py |
return getattr(self,suffix)(data[prefix+'-index']) | try: v=data[prefix+'-index'] except: pass else: return getattr(self,suffix)(v) | def __getitem__(self,key, special_prefixes=special_prefixes, special_prefix=special_prefixes.has_key ): data=self.data if data.has_key(key): return data[key] | 037acbd3d8f0686b9261e63204402cb886a32a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/037acbd3d8f0686b9261e63204402cb886a32a35/DT_InSV.py |
__builtins__.__debug__=DEBUG | def server_info(old, v, offset=0): # interpret v as a port or address/port and get new value if v == '-': v='' l=string.find(v, ':') if l >= 0: a=v[:l] v=v[l+1:] else: a=IP_ADDRESS if not v: return v try: v=string.atoi(v) if v < 0: raise 'Invalid port', v v=v+offset except: raise 'Invalid port', v if type(old) is type(0): old=[(a,v)] else: old.append((a,v)) return old | 2bf9a0b88536028e3d1cdc5241d6a20c16da8179 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2bf9a0b88536028e3d1cdc5241d6a20c16da8179/z2.py |
|
if hasattr(aq_base(ob), 'isTopLevelPrincipiaApplicationObject'): | if hasattr(aq_base(ob), 'isTopLevelPrincipiaApplicationObject') and \ ob.isTopLevelPrincipiaApplicationObject: | def is_acquired(ob, hasattr=hasattr, aq_base=aq_base, absattr=absattr): # Return true if this object is not a direct # subobject of its aq_parent object. if not hasattr(ob, 'aq_parent'): return 0 if hasattr(aq_base(ob.aq_parent), absattr(ob.id)): return 0 if hasattr(aq_base(ob), 'isTopLevelPrincipiaApplicationObject'): return 0 return 1 | 60a0b398dcb238095f77c4fc71849f8a984afb9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/60a0b398dcb238095f77c4fc71849f8a984afb9f/Common.py |
def valid_roles(self): "Return list of valid roles" obj=self dict={} dup =dict.has_key x=0 while x < 100: if hasattr(obj, '__ac_roles__'): roles=obj.__ac_roles__ for role in roles: if not dup(role): dict[role]=1 if not hasattr(obj, 'aq_parent'): break obj=obj.aq_parent x=x+1 roles=dict.keys() roles.sort() return roles | ea16653978f693a66ce651c42065dc9b4873bdba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ea16653978f693a66ce651c42065dc9b4873bdba/ZCatalog.py |
||
""" """ while path and path[0]=='/': path=path[1:] while path and path[-1]=='/': path=path[:-1] req=REQUEST.clone() rsp=req.response req['PATH_INFO']=path object=None try: object=req.traverse(path) except: pass if object is not None: if hasattr(object, 'id'): if callable(object.id): name=object.id() else: name=object.id elif hasattr(object, '__name__'): name=object.__name__ else: name='' if name != os.path.split(path)[-1]: result = req.PARENTS[0] req.close() return result req.close() return object req.close() raise rsp.errmsg, sys.exc_value | """ Attempt to resolve a url into an object in the Zope namespace. The url may be absolute or a catalog path style url. If no object is found, None is returned. No exceptions are raised. """ script=REQUEST.script if string.find(path, script) != 0: path='%s/%s' % (script, path) try: return REQUEST.resolve_url(path) except: return None | def resolve_url(self, path, REQUEST): """ """ while path and path[0]=='/': path=path[1:] while path and path[-1]=='/': path=path[:-1] req=REQUEST.clone() rsp=req.response req['PATH_INFO']=path object=None try: object=req.traverse(path) except: # Do NOT call rsp.exception here! pass if object is not None: if hasattr(object, 'id'): if callable(object.id): name=object.id() else: name=object.id elif hasattr(object, '__name__'): name=object.__name__ else: name='' if name != os.path.split(path)[-1]: result = req.PARENTS[0] req.close() return result req.close() return object req.close() raise rsp.errmsg, sys.exc_value | ea16653978f693a66ce651c42065dc9b4873bdba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ea16653978f693a66ce651c42065dc9b4873bdba/ZCatalog.py |
print >> _log_dest, "s: %s" % error[:2] | print >> _log_dest, "%s: %s" % error[:2] | def log(self, subsystem, severity, summary, detail, error): if _log_dest is None or severity < _log_level: return | 264612cd44fe07811eecf63818b3d27826210985 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/264612cd44fe07811eecf63818b3d27826210985/MinimalLogger.py |
Globals.Bobobase['roles']=tuple(role_names) | role_names=tuple(role_names) if Globals.Bobobase['roles'] != role_names: Globals.Bobobase['roles'] = role_names | def productItems(self, name=name): t=[] for i in self.objectMap(): if i['meta_type']=='Image': n=i['name'] t.append((n,getattr(self,n))) return t | 139bce07bc24c093a663d12c43e8504f1324ef54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/139bce07bc24c093a663d12c43e8504f1324ef54/Application.py |
import sys, os, string, types, cgi, regex, regsub, base64 | import sys, os, string, cgi, regex, regsub | def main(): # The "main" program for this module pass | 6e60c63abb35f639b7efc369be01caf096484aa1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6e60c63abb35f639b7efc369be01caf096484aa1/Publish.py |
try: | if environ.has_key('HTTP_AUTHORIZATION'): | def __init__(self, | 6e60c63abb35f639b7efc369be01caf096484aa1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6e60c63abb35f639b7efc369be01caf096484aa1/Publish.py |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.