rem
stringlengths 1
322k
| add
stringlengths 0
2.05M
| context
stringlengths 4
228k
| meta
stringlengths 156
215
|
---|---|---|---|
if rawdata[i:i+4] != '<!--': raise HTMLParseError('unexpected call to parse_comment()', self.getpos()) | assert rawdata[i:i+4] == '<!--', 'unexpected call to parse_comment()' | def parse_comment(self, i): rawdata = self.rawdata if rawdata[i:i+4] != '<!--': raise HTMLParseError('unexpected call to parse_comment()', self.getpos()) match = commentclose.search(rawdata, i+4) if not match: return -1 j = match.start(0) self.handle_comment(rawdata[i+4: j]) j = match.end(0) return j-i | fb73bb90b42a2921c8b23fa136cd78a10847a78a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fb73bb90b42a2921c8b23fa136cd78a10847a78a/HTMLParser.py |
if rawdata[i:i+2] != '<?': raise HTMLParseError('unexpected call to parse_pi()', self.getpos()) | assert rawdata[i:i+2] == '<?', 'unexpected call to parse_pi()' | def parse_pi(self, i): rawdata = self.rawdata if rawdata[i:i+2] != '<?': raise HTMLParseError('unexpected call to parse_pi()', self.getpos()) match = piclose.search(rawdata, i+2) if not match: return -1 j = match.start(0) self.handle_pi(rawdata[i+2: j]) j = match.end(0) return j-i | fb73bb90b42a2921c8b23fa136cd78a10847a78a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fb73bb90b42a2921c8b23fa136cd78a10847a78a/HTMLParser.py |
if not match: raise HTMLParseError('unexpected call to parse_starttag()', self.getpos()) | assert match, 'unexpected call to parse_starttag()' | def parse_starttag(self, i): self.__starttag_text = None rawdata = self.rawdata m = locatestarttagend.match(rawdata, i) if not m: return -1 endpos = m.end(0) self.__starttag_text = rawdata[i:endpos] | fb73bb90b42a2921c8b23fa136cd78a10847a78a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fb73bb90b42a2921c8b23fa136cd78a10847a78a/HTMLParser.py |
"""Create a tuple consisting of a single instance whos attributes are | """Create a tuple consisting of a single instance whose attributes are | def namespace(self, **kw): """Create a tuple consisting of a single instance whos attributes are provided as keyword arguments.""" # NOTE: the self argument needs to be a TemplateDict instance. return apply(self, (), kw) | 7929924aa812886383fa445553ee55a692bf6b46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/7929924aa812886383fa445553ee55a692bf6b46/DT_Util.py |
if type(self) != TemplateDict: raise TypeError,'''A call was made to DT_Util.namespace() with an incorrect "self" argument. It could be caused by a product which is not yet compatible with this version of Zope. The traceback information may contain more details.''' | def namespace(self, **kw): """Create a tuple consisting of a single instance whos attributes are provided as keyword arguments.""" # NOTE: the self argument needs to be a TemplateDict instance. return apply(self, (), kw) | 7929924aa812886383fa445553ee55a692bf6b46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/7929924aa812886383fa445553ee55a692bf6b46/DT_Util.py |
|
if a level > 1 | if a level > 1. This fix is lame. The problem should be fixed inside STXNG | def spacestrip(txt): """ dedent text by 2 spaces ! We need this to workaround a nasty bug in STXNG. STXNG creates empty <pre>..</pre> when then text start if a level > 1 """ l = [] for x in string.split(txt,"\n"): if len(x)>2 and x[:2]==' ': l.append(x[2:]) return string.join(l,'\n') | e67aa99a87e5d6e50c213becc33c9b48a73ab020 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e67aa99a87e5d6e50c213becc33c9b48a73ab020/__init__.py |
return self.manage_workspace(self, REQUEST, update_menu=1) | return self.manage_main(self, REQUEST, update_menu=1) | def manage_addFolder(self, id, title='', createPublic=0, createUserF=0, REQUEST=None): """Add a new Folder object with id *id*. If the 'createPublic' and 'createUserF' parameters are set to any true value, an 'index_html' and a 'UserFolder' objects are created respectively in the new folder. """ ob=Folder() ob.id=id ob.title=title self._setObject(id, ob) try: user=REQUEST['AUTHENTICATED_USER'] except: user=None if createUserF: if (user is not None) and not ( user.has_permission('Add User Folders', self)): raise 'Unauthorized', ( 'You are not authorized to add User Folders.' ) ob.manage_addUserFolder() if createPublic: if (user is not None) and not ( user.has_permission('Add Documents, Images, and Files', self)): raise 'Unauthorized', ( 'You are not authorized to add DTML Documents.' ) ob.manage_addDTMLDocument(id='index_html', title='') if REQUEST is not None: return self.manage_workspace(self, REQUEST, update_menu=1) | 5398c40fe0ac91d81d8c4ca6c38d8ed5e5d6b073 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/5398c40fe0ac91d81d8c4ca6c38d8ed5e5d6b073/Folder.py |
Append a value to a cookie | Append a value to a header. | def appendHeader(name, value, delimiter=","): ''' Append a value to a cookie Sets an HTTP return header "name" with value "value", appending it following a comma if there was a previous value set for the header. | c8894ea5d3fe3e1893fbdf8c9fc41c156f4c3ce6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c8894ea5d3fe3e1893fbdf8c9fc41c156f4c3ce6/Response.py |
def shutdown(exit_code,fast = 0): global _shutdown_phase global _shutdown_timeout if _shutdown_phase == 0: # Thread safety? proably no need to care import ZServer ZServer.exit_code = exit_code _shutdown_phase = 1 if fast: # Someone wants us to shutdown fast. This is hooked into SIGTERM - so possibly # the system is going down and we can expect a SIGKILL within a few seconds. # Limit each shutdown phase to one second. This is fast enough, but still clean. _shutdown_timeout = 1.0 | 73a6df5813085d6e531e198803e31c936c16e759 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/73a6df5813085d6e531e198803e31c936c16e759/Lifetime.py |
||
$Id: Publish.py,v 1.26 1996/11/26 22:06:18 jim Exp $""" | $Id: Publish.py,v 1.27 1996/12/30 14:36:12 jim Exp $""" | def taste(spam): "a favorable reviewer" return spam,'yum yum, I like ' + spam | 3acdcbee8768b5cb4047573a5736a805014b0c28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3acdcbee8768b5cb4047573a5736a805014b0c28/Publish.py |
__version__='$Revision: 1.26 $'[11:-2] | __version__='$Revision: 1.27 $'[11:-2] | def taste(spam): "a favorable reviewer" return spam,'yum yum, I like ' + spam | 3acdcbee8768b5cb4047573a5736a805014b0c28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3acdcbee8768b5cb4047573a5736a805014b0c28/Publish.py |
"The parameter, %s, was ommitted from the request." | "The parameter, %s, was omitted from the request." | def badRequestError(self,name): | 3acdcbee8768b5cb4047573a5736a805014b0c28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3acdcbee8768b5cb4047573a5736a805014b0c28/Publish.py |
url.append(id) | url.append(quote(id)) | def absolute_url(self, relative=0): """Return an absolute url to the object. Note that the url will reflect the acquisition path of the object if the object has been acquired.""" obj=self url=[] while hasattr(obj, 'aq_parent') and hasattr(obj.aq_parent, 'id'): id=callable(obj.id) and obj.id() or str(obj.id) url.append(id) obj=obj.aq_parent if not relative: url.append(self.aq_acquire('REQUEST').script) url.reverse() return quote(join(url, '/')) | d1acdb6e58ec0957d7763555a061efc314751175 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d1acdb6e58ec0957d7763555a061efc314751175/SimpleItem.py |
return quote(join(url, '/')) | return join(url, '/') | def absolute_url(self, relative=0): """Return an absolute url to the object. Note that the url will reflect the acquisition path of the object if the object has been acquired.""" obj=self url=[] while hasattr(obj, 'aq_parent') and hasattr(obj.aq_parent, 'id'): id=callable(obj.id) and obj.id() or str(obj.id) url.append(id) obj=obj.aq_parent if not relative: url.append(self.aq_acquire('REQUEST').script) url.reverse() return quote(join(url, '/')) | d1acdb6e58ec0957d7763555a061efc314751175 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d1acdb6e58ec0957d7763555a061efc314751175/SimpleItem.py |
getattr(self,id).propertysheets.permissions.manage_edit( selected=['Add %ss' % id]) getattr(self,id).manage_setPermissionMapping( | Z=self._getOb(id) Z.propertysheets.permissions.manage_edit( selected=['Add %ss' % id]) Z.manage_setPermissionMapping( | def manage_addZClass(self, id, title='', baseclasses=[], meta_type='', CreateAFactory=0, REQUEST=None): """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) 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 ) getattr(self,id).propertysheets.permissions.manage_edit( selected=['Add %ss' % id]) getattr(self,id).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) | 650bde1cd3ab7e5ba3448cde06ca520c6d0df2b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/650bde1cd3ab7e5ba3448cde06ca520c6d0df2b2/ZClass.py |
if sys.modules.has_key(m): | if sys.modules.has_key(m) and sys.modules[m]._m.has_key(name): | def __getattr__(self, name): p=self.__dict__['_product'] d=p.__dict__ if hasattr(p,name) and d.has_key(name): m=d[name] w=getattr(m, '_permissionMapper', None) if w is not None: m=ofWrapper(aqwrap(m, getattr(w,'aq_base',w), self)) return m | ba8705e7c98b8b85bc2d90820094d9fbb543b512 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ba8705e7c98b8b85bc2d90820094d9fbb543b512/FactoryDispatcher.py |
def parens(s, parens_re=re.compile(r'(\|)').search): | def parens(s, parens_re=re.compile('[\(\)]').search): | def parens(s, parens_re=re.compile(r'(\|)').search): index = open_index = paren_count = 0 while 1: index = parens_re(s, index) if index is None : break if s[index] == '(': paren_count = paren_count + 1 if open_index == 0 : open_index = index + 1 else: paren_count = paren_count - 1 if paren_count == 0: return open_index, index else: index = index + 1 if paren_count == 0: # No parentheses Found return None else: raise QueryError, "Mismatched parentheses" | fe555b166dcfc601eda0cb370dab9bce1d7c8d09 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fe555b166dcfc601eda0cb370dab9bce1d7c8d09/UnTextIndex.py |
index = parens_re(s, index) if index is None : break | mo = parens_re(s, index) if mo is None : break index = mo.start(0) | def parens(s, parens_re=re.compile(r'(\|)').search): index = open_index = paren_count = 0 while 1: index = parens_re(s, index) if index is None : break if s[index] == '(': paren_count = paren_count + 1 if open_index == 0 : open_index = index + 1 else: paren_count = paren_count - 1 if paren_count == 0: return open_index, index else: index = index + 1 if paren_count == 0: # No parentheses Found return None else: raise QueryError, "Mismatched parentheses" | fe555b166dcfc601eda0cb370dab9bce1d7c8d09 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fe555b166dcfc601eda0cb370dab9bce1d7c8d09/UnTextIndex.py |
def parens(s, parens_re=re.compile(r'(\|)').search): index = open_index = paren_count = 0 while 1: index = parens_re(s, index) if index is None : break if s[index] == '(': paren_count = paren_count + 1 if open_index == 0 : open_index = index + 1 else: paren_count = paren_count - 1 if paren_count == 0: return open_index, index else: index = index + 1 if paren_count == 0: # No parentheses Found return None else: raise QueryError, "Mismatched parentheses" | fe555b166dcfc601eda0cb370dab9bce1d7c8d09 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fe555b166dcfc601eda0cb370dab9bce1d7c8d09/UnTextIndex.py |
||
def close(self, unlink=0): | def close(self, unlink=1): | def close(self, unlink=0): """Close the file. | 34b88faf0fff20605883208a8d9cd102f18929dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/34b88faf0fff20605883208a8d9cd102f18929dd/CommitLog.py |
self._fp.close() if unlink: os.unlink(self._fp.name) | if self._fp: self._fp.close() if unlink or self._unlink: os.unlink(self._fp.name) self._fp = None | def close(self, unlink=0): """Close the file. | 34b88faf0fff20605883208a8d9cd102f18929dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/34b88faf0fff20605883208a8d9cd102f18929dd/CommitLog.py |
return unittest.makeSuite(BatchTests) | return makeSuite(BatchTests) | def test_suite(): return unittest.makeSuite(BatchTests) | 3cccd0d8823b90e9585875935c28ba8c14c9150b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3cccd0d8823b90e9585875935c28ba8c14c9150b/testBatch.py |
r.data_record_id_ = 1 | r.data_record_score__ = 1 | def __getitem__(self, index, ttype=type(())): """ Returns instances of self._v_brains, or whatever is passed into self.useBrains. """ | 07b5264804823afd08326708c7006edcba38b33b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/07b5264804823afd08326708c7006edcba38b33b/Catalog.py |
if ininstance(MONITOR_PORT, IntType): | if isinstance(MONITOR_PORT, IntType): | def _warn_nobody(): zLOG.LOG("z2", zLOG.INFO, ("Running Zope as 'nobody' can compromise " "your Zope files; consider using a " "dedicated user account for Zope") ) | 8126c2e08f4181caf82ed004268908caf29fd623 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8126c2e08f4181caf82ed004268908caf29fd623/z2.py |
if instance(UID, StringType): | if isinstance(UID, StringType): | def _warn_nobody(): zLOG.LOG("z2", zLOG.INFO, ("Running Zope as 'nobody' can compromise " "your Zope files; consider using a " "dedicated user account for Zope") ) | 8126c2e08f4181caf82ed004268908caf29fd623 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8126c2e08f4181caf82ed004268908caf29fd623/z2.py |
elif instance(UID, IntType): | elif isinstance(UID, IntType): | def _warn_nobody(): zLOG.LOG("z2", zLOG.INFO, ("Running Zope as 'nobody' can compromise " "your Zope files; consider using a " "dedicated user account for Zope") ) | 8126c2e08f4181caf82ed004268908caf29fd623 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8126c2e08f4181caf82ed004268908caf29fd623/z2.py |
if v1 == "NA" or v2 == "NA": return "I" else: return (all[i] + all[i2]) / 2 | if type(v1) is type('') or type(v2) is type(''): return "I" else: return (v1 + v2) / 2 | def median(self): all = self.all() l = len(all) if l == 0: return "I" else: if l == 1: return all[0] elif l % 2 != 0: i = l/2 + 1 return all[i] else: i = l/2 - 1 i2 = i + 1 v1 = all[i] v2 = all[i2] if v1 == "NA" or v2 == "NA": return "I" else: return (all[i] + all[i2]) / 2 | 7c1487b7e4538a2e93a645bf46aced5a77988621 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/7c1487b7e4538a2e93a645bf46aced5a77988621/requestprofiler.py |
LOG('UnIndex', ERROR, ('unindex_object tried to retrieve set %s' 'from index %s but couldn\'t. This ' 'should not happen.' % (repr(set), str(k)))) | def unindex_object(self, i): """ Unindex the object with integer id 'i' and don't raise an exception if we fail """ index = self._index unindex = self._unindex | 2a82ac80f2eb03b7afdd449e8c31b10455d660b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2a82ac80f2eb03b7afdd449e8c31b10455d660b0/UnIndex.py |
|
'integer id %s from index.' % str(k))) | 'integer id %s from index %s. This ' 'should not happen.' % (str(i), str(k)))) else: LOG('UnIndex', ERROR, ('unindex_object tried to retrieve set %s ' 'from index %s but couldn\'t. This ' 'should not happen.' % (repr(set),str(k)))) | def unindex_object(self, i): """ Unindex the object with integer id 'i' and don't raise an exception if we fail """ index = self._index unindex = self._unindex | 2a82ac80f2eb03b7afdd449e8c31b10455d660b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2a82ac80f2eb03b7afdd449e8c31b10455d660b0/UnIndex.py |
t="<p><strong>%s</strong><p>" % strip(ctag(t)) | t="<p><strong>%s</strong></p>" % strip(ctag(t)) | def head(self, before, t, level, d): if level > 0 and level < 6: return ('%s<h%d>%s</h%d>\n%s\n' % (before,level,strip(ctag(t)),level,d)) t="<p><strong>%s</strong><p>" % strip(ctag(t)) return ('%s<dl><dt>%s\n</dt><dd>%s\n</dd></dl>\n' % (before,t,d)) | 8595964a97697010af972509b9ca4ae48aaac388 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8595964a97697010af972509b9ca4ae48aaac388/StructuredText.py |
dbtab.databases.update(getattr(DB, 'databases', {})) DB.databases = dbtab.databases | databases.update(getattr(DB, 'databases', {})) DB.databases = databases | def startup(): global app # Import products OFS.Application.import_products() configuration = getConfiguration() # Open the database dbtab = configuration.dbtab try: # Try to use custom storage try: m=imp.find_module('custom_zodb',[configuration.testinghome]) except: m=imp.find_module('custom_zodb',[configuration.instancehome]) except: # if there is no custom_zodb, use the config file specified databases DB = dbtab.getDatabase('/', is_root=1) else: m=imp.load_module('Zope2.custom_zodb', m[0], m[1], m[2]) sys.modules['Zope2.custom_zodb']=m if hasattr(m,'DB'): DB=m.DB dbtab.databases.update(getattr(DB, 'databases', {})) DB.databases = dbtab.databases else: DB = ZODB.DB(m.Storage, databases=dbtab.databases) Globals.BobobaseName = DB.getName() if DB.getActivityMonitor() is None: from ZODB.ActivityMonitor import ActivityMonitor DB.setActivityMonitor(ActivityMonitor()) Globals.DB = DB # Ick, this is temporary until we come up with some registry Zope2.DB = DB # Hook for providing multiple transaction object manager undo support: Globals.UndoManager=DB Globals.opened.append(DB) import ClassFactory DB.classFactory = ClassFactory.ClassFactory # "Log on" as system user newSecurityManager(None, AccessControl.User.system) # Set up the "app" object that automagically opens # connections app = App.ZApplication.ZApplicationWrapper( DB, 'Application', OFS.Application.Application, (), Globals.VersionNameName) Zope2.bobo_application = app # Initialize the app object application = app() OFS.Application.initialize(application) if Globals.DevelopmentMode: # Set up auto-refresh. from App.RefreshFuncs import setupAutoRefresh setupAutoRefresh(application._p_jar) application._p_jar.close() # "Log off" as system user noSecurityManager() global startup_time startup_time = asctime() Zope2.zpublisher_transactions_manager = TransactionsManager() Zope2.zpublisher_exception_hook = zpublisher_exception_hook Zope2.zpublisher_validated_hook = validated_hook Zope2.__bobo_before__ = noSecurityManager | 68b3ae5a2d9ec6dafff1ea05d981c6a0d55bcdd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/68b3ae5a2d9ec6dafff1ea05d981c6a0d55bcdd3/startup.py |
DB = ZODB.DB(m.Storage, databases=dbtab.databases) | DB = ZODB.DB(m.Storage, databases=databases) | def startup(): global app # Import products OFS.Application.import_products() configuration = getConfiguration() # Open the database dbtab = configuration.dbtab try: # Try to use custom storage try: m=imp.find_module('custom_zodb',[configuration.testinghome]) except: m=imp.find_module('custom_zodb',[configuration.instancehome]) except: # if there is no custom_zodb, use the config file specified databases DB = dbtab.getDatabase('/', is_root=1) else: m=imp.load_module('Zope2.custom_zodb', m[0], m[1], m[2]) sys.modules['Zope2.custom_zodb']=m if hasattr(m,'DB'): DB=m.DB dbtab.databases.update(getattr(DB, 'databases', {})) DB.databases = dbtab.databases else: DB = ZODB.DB(m.Storage, databases=dbtab.databases) Globals.BobobaseName = DB.getName() if DB.getActivityMonitor() is None: from ZODB.ActivityMonitor import ActivityMonitor DB.setActivityMonitor(ActivityMonitor()) Globals.DB = DB # Ick, this is temporary until we come up with some registry Zope2.DB = DB # Hook for providing multiple transaction object manager undo support: Globals.UndoManager=DB Globals.opened.append(DB) import ClassFactory DB.classFactory = ClassFactory.ClassFactory # "Log on" as system user newSecurityManager(None, AccessControl.User.system) # Set up the "app" object that automagically opens # connections app = App.ZApplication.ZApplicationWrapper( DB, 'Application', OFS.Application.Application, (), Globals.VersionNameName) Zope2.bobo_application = app # Initialize the app object application = app() OFS.Application.initialize(application) if Globals.DevelopmentMode: # Set up auto-refresh. from App.RefreshFuncs import setupAutoRefresh setupAutoRefresh(application._p_jar) application._p_jar.close() # "Log off" as system user noSecurityManager() global startup_time startup_time = asctime() Zope2.zpublisher_transactions_manager = TransactionsManager() Zope2.zpublisher_exception_hook = zpublisher_exception_hook Zope2.zpublisher_validated_hook = validated_hook Zope2.__bobo_before__ = noSecurityManager | 68b3ae5a2d9ec6dafff1ea05d981c6a0d55bcdd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/68b3ae5a2d9ec6dafff1ea05d981c6a0d55bcdd3/startup.py |
def parens(s, parens_re=re.compile(r'(\|)').search): | def parens(s, parens_re=re.compile('[\(\)]').search): | def parens(s, parens_re=re.compile(r'(\|)').search): index = open_index = paren_count = 0 while 1: index = parens_re(s, index) if index is None : break if s[index] == '(': paren_count = paren_count + 1 if open_index == 0 : open_index = index + 1 else: paren_count = paren_count - 1 if paren_count == 0: return open_index, index else: index = index + 1 if paren_count == 0: # No parentheses Found return None else: raise QueryError, "Mismatched parentheses" | c6172d12fc0d63366a7ed3f7715254c52bfce100 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c6172d12fc0d63366a7ed3f7715254c52bfce100/TextIndex.py |
index = parens_re(s, index) if index is None : break | mo = parens_re(s, index) if mo is None : break index = mo.start(0) | def parens(s, parens_re=re.compile(r'(\|)').search): index = open_index = paren_count = 0 while 1: index = parens_re(s, index) if index is None : break if s[index] == '(': paren_count = paren_count + 1 if open_index == 0 : open_index = index + 1 else: paren_count = paren_count - 1 if paren_count == 0: return open_index, index else: index = index + 1 if paren_count == 0: # No parentheses Found return None else: raise QueryError, "Mismatched parentheses" | c6172d12fc0d63366a7ed3f7715254c52bfce100 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c6172d12fc0d63366a7ed3f7715254c52bfce100/TextIndex.py |
def parens(s, parens_re=re.compile(r'(\|)').search): index = open_index = paren_count = 0 while 1: index = parens_re(s, index) if index is None : break if s[index] == '(': paren_count = paren_count + 1 if open_index == 0 : open_index = index + 1 else: paren_count = paren_count - 1 if paren_count == 0: return open_index, index else: index = index + 1 if paren_count == 0: # No parentheses Found return None else: raise QueryError, "Mismatched parentheses" | c6172d12fc0d63366a7ed3f7715254c52bfce100 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c6172d12fc0d63366a7ed3f7715254c52bfce100/TextIndex.py |
||
'--config-file', action="callback", type="string", | '--config-file', action="callback", type="string", dest='config_file', | def load_config_file(option, opt, config_file, *ignored): config_file = os.path.abspath(config_file) print "Parsing %s" % config_file import Zope2 Zope2.configure(config_file) | 6698247ce58ad1b0e5174d81fad99915ac8b9c58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6698247ce58ad1b0e5174d81fad99915ac8b9c58/test.py |
Initialize Zope with the given config file. | Initialize Zope with the given configuration file. | def load_config_file(option, opt, config_file, *ignored): config_file = os.path.abspath(config_file) print "Parsing %s" % config_file import Zope2 Zope2.configure(config_file) | 6698247ce58ad1b0e5174d81fad99915ac8b9c58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6698247ce58ad1b0e5174d81fad99915ac8b9c58/test.py |
data = self.conn.recv(1024) | data = self.getLine() | def _check(self, lev='250'): data = self.conn.recv(1024) if data[:3] != lev: raise smtpError, "Expected %s, got %s from SMTP"%(lev, data[:3]) | 9053f3a7d89c9221d82d8532dedda36f12e7b3c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9053f3a7d89c9221d82d8532dedda36f12e7b3c3/MailHost.py |
('View', ['index_html','view_image_or_file','getSize','getContentType']), | ('View', ['index_html','view_image_or_file','getSize','getContentType', '']), | def manage_addFile(self,id,file,title='',precondition='',REQUEST=None): """Add a new File object. Creates a new file object 'id' with the contents of 'file'""" self._setObject(id, File(id,title,file,precondition)) if REQUEST is not None: return self.manage_main(self,REQUEST) | 2970a29487b7f52c4cfcd5833226880a444fe771 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2970a29487b7f52c4cfcd5833226880a444fe771/Image.py |
def view_image_or_file(self,REQUEST,RESPONSE): | def view_image_or_file(self,URL1): | def view_image_or_file(self,REQUEST,RESPONSE): | 2970a29487b7f52c4cfcd5833226880a444fe771 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2970a29487b7f52c4cfcd5833226880a444fe771/Image.py |
return self.index_html(REQUEST,RESPONSE) | raise 'Redirect', URL1 | def view_image_or_file(self,REQUEST,RESPONSE): | 2970a29487b7f52c4cfcd5833226880a444fe771 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2970a29487b7f52c4cfcd5833226880a444fe771/Image.py |
n=chidren[0] | n=children[0] | def getFirstChild(self, type=type, st=type('')): """ The first child of this node. If there is no such node this returns None """ children = self.getChildren() | 8835bf479a848bd4d8f51a8327f97c91cee1c2ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8835bf479a848bd4d8f51a8327f97c91cee1c2ab/STDOM.py |
return self.GetNodeValue(type,st) | return self.getNodeValue(type,st) | def _get_NodeValue(self, type=type, st=type('')): return self.GetNodeValue(type,st) | 8835bf479a848bd4d8f51a8327f97c91cee1c2ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8835bf479a848bd4d8f51a8327f97c91cee1c2ab/STDOM.py |
try: db=self._p_jar.db() except: return Globals.BobobaseName else: return db.getName() | return self._p_jar.db().getName() | def db_name(self): try: db=self._p_jar.db() except: # BoboPOS 2 return Globals.BobobaseName else: # ZODB 3 return db.getName() | afce8b88ed060178ee9f7a46a75aaf6d43409fb9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/afce8b88ed060178ee9f7a46a75aaf6d43409fb9/ApplicationManager.py |
def dbconnections(self): return Globals.DB.connectionDebugInfo() | def rcdeltas(self): if self._v_rcs is None: self.rcsnapshot() nc=self.refdict() rc=self._v_rcs rd=[] for n, c in nc.items(): prev=rc[n] if c > prev: rd.append( (c - prev, (c, prev, n)) ) rd.sort() rd.reverse() | afce8b88ed060178ee9f7a46a75aaf6d43409fb9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/afce8b88ed060178ee9f7a46a75aaf6d43409fb9/ApplicationManager.py |
|
try: db=self._p_jar.db() except: pass else: t=db.pack(t) if REQUEST is not None: REQUEST['RESPONSE'].redirect( REQUEST['URL1']+'/manage_workspace') return t if self._p_jar.db is not Globals.Bobobase._jar.db: raise 'Version Error', ( '''You may not pack the application database while working in a <em>version</em>''') if Globals.Bobobase.has_key('_pack_time'): since=Globals.Bobobase['_pack_time'] if t <= since: if REQUEST: return self.manage_main(self, REQUEST) return Globals.Bobobase._jar.db.pack(t,0) Globals.Bobobase['_pack_time']=t get_transaction().note('') get_transaction().commit() if REQUEST: return self.manage_main(self, REQUEST) | db=self._p_jar.db() t=db.pack(t) if REQUEST is not None: REQUEST['RESPONSE'].redirect( REQUEST['URL1']+'/manage_workspace') return t | def manage_pack(self, days=0, REQUEST=None): """Pack the database""" | afce8b88ed060178ee9f7a46a75aaf6d43409fb9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/afce8b88ed060178ee9f7a46a75aaf6d43409fb9/ApplicationManager.py |
self.threshold = thresholdb | self.threshold = threshold | def manage_edit(self, RESPONSE, URL1, threshold=1000, REQUEST=None): """ edit the catalog """ self.threshold = thresholdb | 8f1d78c8726f1c96d9a6e93168576401ed8a01fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8f1d78c8726f1c96d9a6e93168576401ed8a01fa/ZCatalog.py |
if not hasattr(self, '_v_total'): self._v_total = 0 | def catalog_object(self, obj, uid): """ wrapper around catalog """ if not hasattr(self, '_v_total'): self._v_total = 0 self._v_total = (self._v_total + self._catalog.catalogObject(obj, uid, self.threshold)) if self._v_total > self.threshold: get_transaction().commit(1) self._v_total = 0 | 8f1d78c8726f1c96d9a6e93168576401ed8a01fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8f1d78c8726f1c96d9a6e93168576401ed8a01fa/ZCatalog.py |
|
try: traverse=object.__bobo_traverse__ except: traverse=None if traverse is not None: | if hasattr(object,'__bobo_traverse__'): | def publish(self, module_name, after_list, published='web_objects', | 015a60d9ad22837fb556ca780c442bd688bfc824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/015a60d9ad22837fb556ca780c442bd688bfc824/Publish.py |
subobject=traverse(request,entry_name) | subobject=object.__bobo_traverse__(request,entry_name) | def publish(self, module_name, after_list, published='web_objects', | 015a60d9ad22837fb556ca780c442bd688bfc824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/015a60d9ad22837fb556ca780c442bd688bfc824/Publish.py |
def old_validation(groups, HTTP_AUTHORIZATION, roles=UNSPECIFIED_ROLES): if lower(HTTP_AUTHORIZATION[:6]) != 'basic ': return None [name,password] = string.splitfields( base64.decodestring( split(HTTP_AUTHORIZATION)[-1]), ':') if roles is None: return name keys=None try: keys=groups.keys except: try: groups=groups() # Maybe it was a method defining a group keys=groups.keys except: pass if keys is not None: # OK, we have a named group, so apply the roles to the named # group. if roles is UNSPECIFIED_ROLES: roles=keys() g=[] for role in roles: if groups.has_key(role): g.append(groups[role]) groups=g for d in groups: if d.has_key(name) and d[name]==password: return name if keys is None: # Not a named group, so don't go further raise 'Forbidden', ( """<strong>You are not authorized to access this resource""") return None | 015a60d9ad22837fb556ca780c442bd688bfc824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/015a60d9ad22837fb556ca780c442bd688bfc824/Publish.py |
||
response.exception() | def publish_module(module_name, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr, environ=os.environ, debug=0): must_die=0 status=200 after_list=[None] try: response=Response(stdout=stdout, stderr=stderr) publisher = ModulePublisher(stdin=stdin, stdout=stdout, stderr=stderr, environ=environ) response = publisher.response response = publisher.publish(module_name,after_list,debug=debug) except SystemExit: must_die=1 response.exception(must_die) except ImportError, v: if type(v)==types.TupleType and len(v)==3: sys.exc_type, sys.exc_value, sys.exc_traceback = v must_die=1 response.exception(must_die) except: status=response.getStatus() response.exception() if response: response=str(response) if response: stdout.write(response) # The module defined a post-access function, call it if after_list[0] is not None: after_list[0]() if must_die: raise sys.exc_type, sys.exc_value, sys.exc_traceback sys.exc_type, sys.exc_value, sys.exc_traceback = None, None, None return status | 015a60d9ad22837fb556ca780c442bd688bfc824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/015a60d9ad22837fb556ca780c442bd688bfc824/Publish.py |
|
$Id: Publish.py,v 1.48 1997/09/08 14:47:11 jim Exp $""" | $Id: Publish.py,v 1.49 1997/09/09 20:25:21 jim Exp $""" | def taste(spam): "a favorable reviewer" return spam,'yum yum, I like ' + spam | 5e9ddc03906a7421924119e790e97b7b6e4e2f15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/5e9ddc03906a7421924119e790e97b7b6e4e2f15/Publish.py |
__version__='$Revision: 1.48 $'[11:-2] | __version__='$Revision: 1.49 $'[11:-2] | def taste(spam): "a favorable reviewer" return spam,'yum yum, I like ' + spam | 5e9ddc03906a7421924119e790e97b7b6e4e2f15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/5e9ddc03906a7421924119e790e97b7b6e4e2f15/Publish.py |
result=result or {} | if result is None: result={} | def parse_cookie(text, result=None, parmre=regex.compile( '\([\0- ]*' '\([^\0- ;,=\"]+\)=\([^\0- =\"]+\)' '\([\0- ]*[;,]\)?[\0- ]*\)' ), qparmre=regex.compile( '\([\0- ]*' '\([^\0- ;,=\"]+\)="\([^"]*\)\"' '\([\0- ]*[;,]\)?[\0- ]*\)' ), ): result=result or {} if parmre.match(text) >= 0: name=lower(parmre.group(2)) value=parmre.group(3) l=len(parmre.group(1)) elif qparmre.match(text) >= 0: name=lower(qparmre.group(2)) value=qparmre.group(3) l=len(qparmre.group(1)) else: if not text or not strip(text): return result raise "InvalidParameter", text result[name]=value return apply(parse_cookie,(text[l:],result)) | 5e9ddc03906a7421924119e790e97b7b6e4e2f15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/5e9ddc03906a7421924119e790e97b7b6e4e2f15/Publish.py |
index_html=HTMLFile('dtml/APIHelpView', globals()) | index_html=DTMLFile('dtml/APIHelpView', globals()) | def __init__(self, id, title, file): self.id=id self.title=title dict={} execfile(file, dict) self.doc=dict.get('__doc__','') | 10b8eef807a8c8aaab1c9f8cd4c69d0118526ac4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/10b8eef807a8c8aaab1c9f8cd4c69d0118526ac4/APIHelpTopic.py |
view=HTMLFile('dtml/APIView', globals()) | view=DTMLFile('dtml/APIView', globals()) | def SearchableText(self): """ The full text of the API, for indexing purposes. """ text="%s %s" % (self.name, self.doc) for attribute in self.attributes: text="%s %s" % (text, attribute.name) for method in self.methods: text="%s %s %s" % (text, method.name, method.doc) return text | 10b8eef807a8c8aaab1c9f8cd4c69d0118526ac4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/10b8eef807a8c8aaab1c9f8cd4c69d0118526ac4/APIHelpTopic.py |
view=HTMLFile('dtml/attributeView', globals()) | view=DTMLFile('dtml/attributeView', globals()) | def __init__(self, name, value): self.name=name self.value=value | 10b8eef807a8c8aaab1c9f8cd4c69d0118526ac4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/10b8eef807a8c8aaab1c9f8cd4c69d0118526ac4/APIHelpTopic.py |
view=HTMLFile('dtml/methodView', globals()) | view=DTMLFile('dtml/methodView', globals()) | def _createFromFunc(self, func): if hasattr(func, 'im_func'): func=func.im_func | 10b8eef807a8c8aaab1c9f8cd4c69d0118526ac4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/10b8eef807a8c8aaab1c9f8cd4c69d0118526ac4/APIHelpTopic.py |
manage=ManageHTMLFile('AqueductDA/edit') | manage=HTMLFile('AqueductDA/edit') | def test_url_(self): | 67f4c74e69886566a9d2dc145dd746ef45aa77ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/67f4c74e69886566a9d2dc145dd746ef45aa77ab/DA.py |
self.result_names=result.names() self.report_src=custom_default_report(result,action='/manage_testForm') report=DocumentTemplate.HTML(self.report_src) | result_names=result.names() report_src=custom_default_report(result,action='/manage_testForm') if result_names != self.result_names or report_src != self.report_src: self.result_names=names self.report_src=report_src report=DocumentTemplate.HTML(report_src) | def manage_test(self,REQUEST): | 67f4c74e69886566a9d2dc145dd746ef45aa77ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/67f4c74e69886566a9d2dc145dd746ef45aa77ab/DA.py |
for p in instance_class.__ac_permissions__: if len(p) > 2: permissions.append((p[0],p[2])) else: permissions.append(p[0]) | if hasattr(instance_class, '__ac_permissions__'): for p in instance_class.__ac_permissions__: if len(p) > 2: permissions.append((p[0],p[2])) else: permissions.append(p[0]) | def registerClass(self, instance_class=None, meta_type='', permission=None, constructors=(), icon=None, permissions=None, legacy=(), ): """Register a constructor | 5be456102d1a4fb9cbf994f8a0a9000cc834cc8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/5be456102d1a4fb9cbf994f8a0a9000cc834cc8c/ProductContext.py |
if (not hasattr(user, 'hasRole') or not user.hasRole(None, roles)): | if (not hasattr(user, 'has_role') or not user.has_role(roles, self)): | def _verifyObjectPaste(self, ob, REQUEST): if not hasattr(ob, 'meta_type'): raise CopyError, MessageDialog( title='Not Supported', message='The object <EM>%s</EM> does not support this ' \ 'operation' % absattr(ob.id), action='manage_main') mt=ob.meta_type if not hasattr(self, 'all_meta_types'): raise CopyError, MessageDialog( title='Not Supported', message='Cannot paste into this object.', action='manage_main') | 0942edcebb640bedf165bec0aba0e985a5151583 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/0942edcebb640bedf165bec0aba0e985a5151583/CopySupport.py |
__getattr__=get=__getitem__ | __getattr__=__getitem__ def get(self, key, default=None): return self.__getitem__(key, default) | def __getitem__(self,key, default=_marker, # Any special internal marker will do URLmatch=regex.compile('URL[0-9]+$').match, BASEmatch=regex.compile('BASE[0-9]+$').match, ): """Get a variable value | ece9a51201cc0b3e2add187293b60c6ae35832b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ece9a51201cc0b3e2add187293b60c6ae35832b1/HTTPRequest.py |
from CGIResponse import Response | from Response import Response | def publish_module_pm(module_name, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr, environ=os.environ, debug=0): from CGIResponse import Response from Publish import ModulePublisher after_list=[None] request=None try: response=Response(stdout=stdout, stderr=stderr) publisher = ModulePublisher(stdin=stdin, stdout=stdout, stderr=stderr, environ=environ) response = publisher.response request=publisher.request response = publisher.publish(module_name,after_list,debug=debug) request.other={} response=str(response) finally: try: request.other={} except: pass if after_list[0] is not None: after_list[0]() | f61fedd2955f55fe40a818dadbe4b32ff7f66a7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f61fedd2955f55fe40a818dadbe4b32ff7f66a7c/Test.py |
skip_names={'testrunner.py': None, 'test_logger.py': None, 'test_MultiMapping.py': None, 'test_Sync.py': None, 'test_ThreadLock.py': None, 'test_acquisition.py': None, 'test_add.py': None, 'test_binding.py': None, 'test_explicit_acquisition.py': None, 'test_func_attr.py': None, 'test_method_hook.py': None, 'test.py': None, } skip_name=skip_names.has_key | def __init__(self, basepath): # initialize python path self.basepath=path=basepath pjoin=os.path.join if sys.platform == 'win32': sys.path.insert(0, pjoin(path, 'lib/python')) sys.path.insert(1, pjoin(path, 'bin/lib')) sys.path.insert(2, pjoin(path, 'bin/lib/plat-win')) sys.path.insert(3, pjoin(path, 'bin/lib/win32')) sys.path.insert(4, pjoin(path, 'bin/lib/win32/lib')) sys.path.insert(5, path) else: sys.path.insert(0, pjoin(path, 'lib/python')) sys.path.insert(1, path) | b26ccc00e07a9e28efae6443a91327ceedcfb9fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b26ccc00e07a9e28efae6443a91327ceedcfb9fe/testrunner.py |
|
skip_name = self.skip_name | def runPath(self, pathname): """Run all tests found in the directory named by pathname and all subdirectories.""" names=os.listdir(pathname) skip_name = self.skip_name for name in names: fname, ext=os.path.splitext(name) if name[:4]=='test' and name[-3:]=='.py' and \ (not skip_name(name)): filepath=os.path.join(pathname, name) self.runFile(filepath) for name in names: fullpath=os.path.join(pathname, name) if os.path.isdir(fullpath): self.runPath(fullpath) | b26ccc00e07a9e28efae6443a91327ceedcfb9fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b26ccc00e07a9e28efae6443a91327ceedcfb9fe/testrunner.py |
|
(not skip_name(name)): | name != 'testrunner.py': | def runPath(self, pathname): """Run all tests found in the directory named by pathname and all subdirectories.""" names=os.listdir(pathname) skip_name = self.skip_name for name in names: fname, ext=os.path.splitext(name) if name[:4]=='test' and name[-3:]=='.py' and \ (not skip_name(name)): filepath=os.path.join(pathname, name) self.runFile(filepath) for name in names: fullpath=os.path.join(pathname, name) if os.path.isdir(fullpath): self.runPath(fullpath) | b26ccc00e07a9e28efae6443a91327ceedcfb9fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b26ccc00e07a9e28efae6443a91327ceedcfb9fe/testrunner.py |
self.runFile(filepath) | if self.smellsLikeATest(filepath): self.runFile(filepath) | def runPath(self, pathname): """Run all tests found in the directory named by pathname and all subdirectories.""" names=os.listdir(pathname) skip_name = self.skip_name for name in names: fname, ext=os.path.splitext(name) if name[:4]=='test' and name[-3:]=='.py' and \ (not skip_name(name)): filepath=os.path.join(pathname, name) self.runFile(filepath) for name in names: fullpath=os.path.join(pathname, name) if os.path.isdir(fullpath): self.runPath(fullpath) | b26ccc00e07a9e28efae6443a91327ceedcfb9fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b26ccc00e07a9e28efae6443a91327ceedcfb9fe/testrunner.py |
usage_msg="""Usage: python testrunner.py [options] | usage_msg="""Usage: python testrunner.py options | def main(args): usage_msg="""Usage: python testrunner.py [options] If run without options, testrunner will run all test suites found in all subdirectories of the current working directory. options: -a Run all tests found in all subdirectories of the current working directory. This is the default if no options are specified. -d dirpath Run all tests found in the directory specified by dirpath, and recursively in all its subdirectories. The dirpath should be a full system path. -f filepath Run the test suite found in the file specified. The filepath should be a fully qualified path to the file to be run.\n""" pathname=None filename=None test_all=None try: options, arg=getopt.getopt(args, 'ad:f:') for name, value in options: name=name[1:] if name == 'a': test_all=1 elif name == 'd': pathname=string.strip(value) elif name == 'f': filename=string.strip(value) else: err_exit(usage_msg) if not options: test_all=1 except: err_exit(usage_msg) testrunner=TestRunner(os.getcwd()) if test_all: testrunner.runAllTests() elif pathname: testrunner.runPath(pathname) elif filename: testrunner.runFile(filename) sys.exit(0) | b26ccc00e07a9e28efae6443a91327ceedcfb9fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b26ccc00e07a9e28efae6443a91327ceedcfb9fe/testrunner.py |
If run without options, testrunner will run all test suites found in all subdirectories of the current working directory. | If run without options, testrunner will display this usage message. If you want to run all test suites found in all subdirectories of the current working directory, use the -a option. | def main(args): usage_msg="""Usage: python testrunner.py [options] If run without options, testrunner will run all test suites found in all subdirectories of the current working directory. options: -a Run all tests found in all subdirectories of the current working directory. This is the default if no options are specified. -d dirpath Run all tests found in the directory specified by dirpath, and recursively in all its subdirectories. The dirpath should be a full system path. -f filepath Run the test suite found in the file specified. The filepath should be a fully qualified path to the file to be run.\n""" pathname=None filename=None test_all=None try: options, arg=getopt.getopt(args, 'ad:f:') for name, value in options: name=name[1:] if name == 'a': test_all=1 elif name == 'd': pathname=string.strip(value) elif name == 'f': filename=string.strip(value) else: err_exit(usage_msg) if not options: test_all=1 except: err_exit(usage_msg) testrunner=TestRunner(os.getcwd()) if test_all: testrunner.runAllTests() elif pathname: testrunner.runPath(pathname) elif filename: testrunner.runFile(filename) sys.exit(0) | b26ccc00e07a9e28efae6443a91327ceedcfb9fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b26ccc00e07a9e28efae6443a91327ceedcfb9fe/testrunner.py |
should be a fully qualified path to the file to be run.\n""" | should be a fully qualified path to the file to be run. -h Display usage information.\n""" | def main(args): usage_msg="""Usage: python testrunner.py [options] If run without options, testrunner will run all test suites found in all subdirectories of the current working directory. options: -a Run all tests found in all subdirectories of the current working directory. This is the default if no options are specified. -d dirpath Run all tests found in the directory specified by dirpath, and recursively in all its subdirectories. The dirpath should be a full system path. -f filepath Run the test suite found in the file specified. The filepath should be a fully qualified path to the file to be run.\n""" pathname=None filename=None test_all=None try: options, arg=getopt.getopt(args, 'ad:f:') for name, value in options: name=name[1:] if name == 'a': test_all=1 elif name == 'd': pathname=string.strip(value) elif name == 'f': filename=string.strip(value) else: err_exit(usage_msg) if not options: test_all=1 except: err_exit(usage_msg) testrunner=TestRunner(os.getcwd()) if test_all: testrunner.runAllTests() elif pathname: testrunner.runPath(pathname) elif filename: testrunner.runFile(filename) sys.exit(0) | b26ccc00e07a9e28efae6443a91327ceedcfb9fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b26ccc00e07a9e28efae6443a91327ceedcfb9fe/testrunner.py |
options, arg=getopt.getopt(args, 'ad:f:') | options, arg=getopt.getopt(args, 'ahd:f:') if not options: err_exit(usage_msg) | def main(args): usage_msg="""Usage: python testrunner.py [options] If run without options, testrunner will run all test suites found in all subdirectories of the current working directory. options: -a Run all tests found in all subdirectories of the current working directory. This is the default if no options are specified. -d dirpath Run all tests found in the directory specified by dirpath, and recursively in all its subdirectories. The dirpath should be a full system path. -f filepath Run the test suite found in the file specified. The filepath should be a fully qualified path to the file to be run.\n""" pathname=None filename=None test_all=None try: options, arg=getopt.getopt(args, 'ad:f:') for name, value in options: name=name[1:] if name == 'a': test_all=1 elif name == 'd': pathname=string.strip(value) elif name == 'f': filename=string.strip(value) else: err_exit(usage_msg) if not options: test_all=1 except: err_exit(usage_msg) testrunner=TestRunner(os.getcwd()) if test_all: testrunner.runAllTests() elif pathname: testrunner.runPath(pathname) elif filename: testrunner.runFile(filename) sys.exit(0) | b26ccc00e07a9e28efae6443a91327ceedcfb9fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b26ccc00e07a9e28efae6443a91327ceedcfb9fe/testrunner.py |
if not options: test_all=1 | def main(args): usage_msg="""Usage: python testrunner.py [options] If run without options, testrunner will run all test suites found in all subdirectories of the current working directory. options: -a Run all tests found in all subdirectories of the current working directory. This is the default if no options are specified. -d dirpath Run all tests found in the directory specified by dirpath, and recursively in all its subdirectories. The dirpath should be a full system path. -f filepath Run the test suite found in the file specified. The filepath should be a fully qualified path to the file to be run.\n""" pathname=None filename=None test_all=None try: options, arg=getopt.getopt(args, 'ad:f:') for name, value in options: name=name[1:] if name == 'a': test_all=1 elif name == 'd': pathname=string.strip(value) elif name == 'f': filename=string.strip(value) else: err_exit(usage_msg) if not options: test_all=1 except: err_exit(usage_msg) testrunner=TestRunner(os.getcwd()) if test_all: testrunner.runAllTests() elif pathname: testrunner.runPath(pathname) elif filename: testrunner.runFile(filename) sys.exit(0) | b26ccc00e07a9e28efae6443a91327ceedcfb9fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b26ccc00e07a9e28efae6443a91327ceedcfb9fe/testrunner.py |
|
def query(self, pattern): """ """ result = [] for x in self.lexicon.get(pattern): if self.globbing: result.append(self.lexicon._inverseLex[x]) else: result.append(pattern) | 2c262eedb18852e0997db23ac15dcb4b86b5ace3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2c262eedb18852e0997db23ac15dcb4b86b5ace3/Vocabulary.py |
||
def manage_editCataloger(self, default): | def manage_editCataloger(self, default, REQUEST): | def manage_editCataloger(self, default): """ """ self.default_catalog=default message = "Your changes have been saved" return self.manage_main(self, REQUEST, manage_tabs_message=message) | 3f0742d43372b8ef5dcc8ec96dec9d9e861ab094 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3f0742d43372b8ef5dcc8ec96dec9d9e861ab094/CatalogAwareness.py |
def render(self,md): | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
||
def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make state be the ids of ALL subobjects which # are non-empty (recursively). state=tpValuesIds(self) else: try: state=md['state'] if state[0] != '[': state=unquote(state) state=list(eval(state,{'__builtins__':{}})) except: state=[] # Try to save state in a cookie as well... # md['RESPONSE'].setCookie('state',state) root=md['URL'] l=rfind(root, '/') if l >= 0: root=root[l+1:] url='' data =[] data.append('<table cellspacing=0>\n') colspan=1+tpStateLevel(state) treeData={'tree-root-url': root} md.push(treeData) try: for item in self.tpValues(): data=tpRenderTABLE(item,root,url,state,state,data,colspan, section,md,treeData) data.append('</table>\n') result=join(data,'') finally: md.pop(1) return result | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
||
try: collapse_all=md['collapse_all'] | try: collapse_all=md['collapse_all'] | def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make state be the ids of ALL subobjects which # are non-empty (recursively). state=tpValuesIds(self) else: try: state=md['state'] if state[0] != '[': state=unquote(state) state=list(eval(state,{'__builtins__':{}})) except: state=[] # Try to save state in a cookie as well... # md['RESPONSE'].setCookie('state',state) root=md['URL'] l=rfind(root, '/') if l >= 0: root=root[l+1:] url='' data =[] data.append('<table cellspacing=0>\n') colspan=1+tpStateLevel(state) treeData={'tree-root-url': root} md.push(treeData) try: for item in self.tpValues(): data=tpRenderTABLE(item,root,url,state,state,data,colspan, section,md,treeData) data.append('</table>\n') result=join(data,'') finally: md.pop(1) return result | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
try: expand_all=md['expand_all'] | try: expand_all=md['expand_all'] | def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make state be the ids of ALL subobjects which # are non-empty (recursively). state=tpValuesIds(self) else: try: state=md['state'] if state[0] != '[': state=unquote(state) state=list(eval(state,{'__builtins__':{}})) except: state=[] # Try to save state in a cookie as well... # md['RESPONSE'].setCookie('state',state) root=md['URL'] l=rfind(root, '/') if l >= 0: root=root[l+1:] url='' data =[] data.append('<table cellspacing=0>\n') colspan=1+tpStateLevel(state) treeData={'tree-root-url': root} md.push(treeData) try: for item in self.tpValues(): data=tpRenderTABLE(item,root,url,state,state,data,colspan, section,md,treeData) data.append('</table>\n') result=join(data,'') finally: md.pop(1) return result | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make state be the ids of ALL subobjects which # are non-empty (recursively). state=tpValuesIds(self) else: try: state=md['state'] if state[0] != '[': state=unquote(state) state=list(eval(state,{'__builtins__':{}})) except: state=[] # Try to save state in a cookie as well... # md['RESPONSE'].setCookie('state',state) root=md['URL'] l=rfind(root, '/') if l >= 0: root=root[l+1:] url='' data =[] data.append('<table cellspacing=0>\n') colspan=1+tpStateLevel(state) treeData={'tree-root-url': root} md.push(treeData) try: for item in self.tpValues(): data=tpRenderTABLE(item,root,url,state,state,data,colspan, section,md,treeData) data.append('</table>\n') result=join(data,'') finally: md.pop(1) return result | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
||
except: state=[] | except: state=[] if state: md['RESPONSE'].setCookie('state',quote(str(state)[1:-1]+',')) else: md['RESPONSE'].expireCookie('state') | def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make state be the ids of ALL subobjects which # are non-empty (recursively). state=tpValuesIds(self) else: try: state=md['state'] if state[0] != '[': state=unquote(state) state=list(eval(state,{'__builtins__':{}})) except: state=[] # Try to save state in a cookie as well... # md['RESPONSE'].setCookie('state',state) root=md['URL'] l=rfind(root, '/') if l >= 0: root=root[l+1:] url='' data =[] data.append('<table cellspacing=0>\n') colspan=1+tpStateLevel(state) treeData={'tree-root-url': root} md.push(treeData) try: for item in self.tpValues(): data=tpRenderTABLE(item,root,url,state,state,data,colspan, section,md,treeData) data.append('</table>\n') result=join(data,'') finally: md.pop(1) return result | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make state be the ids of ALL subobjects which # are non-empty (recursively). state=tpValuesIds(self) else: try: state=md['state'] if state[0] != '[': state=unquote(state) state=list(eval(state,{'__builtins__':{}})) except: state=[] # Try to save state in a cookie as well... # md['RESPONSE'].setCookie('state',state) root=md['URL'] l=rfind(root, '/') if l >= 0: root=root[l+1:] url='' data =[] data.append('<table cellspacing=0>\n') colspan=1+tpStateLevel(state) treeData={'tree-root-url': root} md.push(treeData) try: for item in self.tpValues(): data=tpRenderTABLE(item,root,url,state,state,data,colspan, section,md,treeData) data.append('</table>\n') result=join(data,'') finally: md.pop(1) return result | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
||
def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make state be the ids of ALL subobjects which # are non-empty (recursively). state=tpValuesIds(self) else: try: state=md['state'] if state[0] != '[': state=unquote(state) state=list(eval(state,{'__builtins__':{}})) except: state=[] # Try to save state in a cookie as well... # md['RESPONSE'].setCookie('state',state) root=md['URL'] l=rfind(root, '/') if l >= 0: root=root[l+1:] url='' data =[] data.append('<table cellspacing=0>\n') colspan=1+tpStateLevel(state) treeData={'tree-root-url': root} md.push(treeData) try: for item in self.tpValues(): data=tpRenderTABLE(item,root,url,state,state,data,colspan, section,md,treeData) data.append('</table>\n') result=join(data,'') finally: md.pop(1) return result | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
||
data.append('<table cellspacing=0>\n') | data.append('<TABLE CELLSPACING="0">\n') | def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make state be the ids of ALL subobjects which # are non-empty (recursively). state=tpValuesIds(self) else: try: state=md['state'] if state[0] != '[': state=unquote(state) state=list(eval(state,{'__builtins__':{}})) except: state=[] # Try to save state in a cookie as well... # md['RESPONSE'].setCookie('state',state) root=md['URL'] l=rfind(root, '/') if l >= 0: root=root[l+1:] url='' data =[] data.append('<table cellspacing=0>\n') colspan=1+tpStateLevel(state) treeData={'tree-root-url': root} md.push(treeData) try: for item in self.tpValues(): data=tpRenderTABLE(item,root,url,state,state,data,colspan, section,md,treeData) data.append('</table>\n') result=join(data,'') finally: md.pop(1) return result | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
data.append('</table>\n') | data.append('</TABLE>\n') | def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make state be the ids of ALL subobjects which # are non-empty (recursively). state=tpValuesIds(self) else: try: state=md['state'] if state[0] != '[': state=unquote(state) state=list(eval(state,{'__builtins__':{}})) except: state=[] # Try to save state in a cookie as well... # md['RESPONSE'].setCookie('state',state) root=md['URL'] l=rfind(root, '/') if l >= 0: root=root[l+1:] url='' data =[] data.append('<table cellspacing=0>\n') colspan=1+tpStateLevel(state) treeData={'tree-root-url': root} md.push(treeData) try: for item in self.tpValues(): data=tpRenderTABLE(item,root,url,state,state,data,colspan, section,md,treeData) data.append('</table>\n') result=join(data,'') finally: md.pop(1) return result | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
def tpRender(self, md, section): # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: # in case of expand all - to maintain state correctly we # have to make state be the ids of ALL subobjects which # are non-empty (recursively). state=tpValuesIds(self) else: try: state=md['state'] if state[0] != '[': state=unquote(state) state=list(eval(state,{'__builtins__':{}})) except: state=[] # Try to save state in a cookie as well... # md['RESPONSE'].setCookie('state',state) root=md['URL'] l=rfind(root, '/') if l >= 0: root=root[l+1:] url='' data =[] data.append('<table cellspacing=0>\n') colspan=1+tpStateLevel(state) treeData={'tree-root-url': root} md.push(treeData) try: for item in self.tpValues(): data=tpRenderTABLE(item,root,url,state,state,data,colspan, section,md,treeData) data.append('</table>\n') result=join(data,'') finally: md.pop(1) return result | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
||
id=item.tpId() e=tpValuesIds(item) if e: id=[id,e] else: id=[id] r.append(id) | if item.tpValues(): id=item.tpId() e=tpValuesIds(item) if e: id=[id,e] else: id=[id] r.append(id) | def tpValuesIds(self): r=[] try: for item in self.tpValues(): try: id=item.tpId() e=tpValuesIds(item) if e: id=[id,e] else: id=[id] r.append(id) except: pass except: pass return r | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
try: items=self.tpValues() | try: items=self.tpValues() | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=None if id is None: try: id=self._p_oid except: id=None if id is None: id=pyid(self) exp=0 sub=None output=data.append # Add prefix output('<tr>') if level: output('<td></td>' * level) # Add tree expand/contract icon if items: output('<td valign=top>') for i in range(len(substate)): sub=substate[i] if sub[0]==id: exp=i+1 break if exp: del substate[exp-1] output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoMinus)) substate.append(sub) else: substate.append([id]) output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoPlus)) del substate[-1] else: output('<td>') output('</td>\n') # add item text output('<td colspan=%s valign=top>' % colspan) output(section(self, md)) output('</td></tr>\n') if exp: for item in items: if len(sub)==1: sub.append([]) data=tpRenderTABLE(item, root_url,url,state,sub[1],data, colspan, section, md, treeData, level+1) if not sub[1]: del sub[1] return data | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
try: id=self.tpId() | try: id=self.tpId() | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=None if id is None: try: id=self._p_oid except: id=None if id is None: id=pyid(self) exp=0 sub=None output=data.append # Add prefix output('<tr>') if level: output('<td></td>' * level) # Add tree expand/contract icon if items: output('<td valign=top>') for i in range(len(substate)): sub=substate[i] if sub[0]==id: exp=i+1 break if exp: del substate[exp-1] output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoMinus)) substate.append(sub) else: substate.append([id]) output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoPlus)) del substate[-1] else: output('<td>') output('</td>\n') # add item text output('<td colspan=%s valign=top>' % colspan) output(section(self, md)) output('</td></tr>\n') if exp: for item in items: if len(sub)==1: sub.append([]) data=tpRenderTABLE(item, root_url,url,state,sub[1],data, colspan, section, md, treeData, level+1) if not sub[1]: del sub[1] return data | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
try: id=self._p_oid | try: id=self._p_oid | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=None if id is None: try: id=self._p_oid except: id=None if id is None: id=pyid(self) exp=0 sub=None output=data.append # Add prefix output('<tr>') if level: output('<td></td>' * level) # Add tree expand/contract icon if items: output('<td valign=top>') for i in range(len(substate)): sub=substate[i] if sub[0]==id: exp=i+1 break if exp: del substate[exp-1] output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoMinus)) substate.append(sub) else: substate.append([id]) output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoPlus)) del substate[-1] else: output('<td>') output('</td>\n') # add item text output('<td colspan=%s valign=top>' % colspan) output(section(self, md)) output('</td></tr>\n') if exp: for item in items: if len(sub)==1: sub.append([]) data=tpRenderTABLE(item, root_url,url,state,sub[1],data, colspan, section, md, treeData, level+1) if not sub[1]: del sub[1] return data | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
output('<tr>') if level: output('<td></td>' * level) | output('<TR>\n') if level: output('<TD WIDTH="16"></TD>\n' * level) | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=None if id is None: try: id=self._p_oid except: id=None if id is None: id=pyid(self) exp=0 sub=None output=data.append # Add prefix output('<tr>') if level: output('<td></td>' * level) # Add tree expand/contract icon if items: output('<td valign=top>') for i in range(len(substate)): sub=substate[i] if sub[0]==id: exp=i+1 break if exp: del substate[exp-1] output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoMinus)) substate.append(sub) else: substate.append([id]) output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoPlus)) del substate[-1] else: output('<td>') output('</td>\n') # add item text output('<td colspan=%s valign=top>' % colspan) output(section(self, md)) output('</td></tr>\n') if exp: for item in items: if len(sub)==1: sub.append([]) data=tpRenderTABLE(item, root_url,url,state,sub[1],data, colspan, section, md, treeData, level+1) if not sub[1]: del sub[1] return data | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=None if id is None: try: id=self._p_oid except: id=None if id is None: id=pyid(self) exp=0 sub=None output=data.append # Add prefix output('<tr>') if level: output('<td></td>' * level) # Add tree expand/contract icon if items: output('<td valign=top>') for i in range(len(substate)): sub=substate[i] if sub[0]==id: exp=i+1 break if exp: del substate[exp-1] output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoMinus)) substate.append(sub) else: substate.append([id]) output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoPlus)) del substate[-1] else: output('<td>') output('</td>\n') # add item text output('<td colspan=%s valign=top>' % colspan) output(section(self, md)) output('</td></tr>\n') if exp: for item in items: if len(sub)==1: sub.append([]) data=tpRenderTABLE(item, root_url,url,state,sub[1],data, colspan, section, md, treeData, level+1) if not sub[1]: del sub[1] return data | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
||
output('<td valign=top>') | output('<TD WIDTH="16" VALIGN="TOP">') | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=None if id is None: try: id=self._p_oid except: id=None if id is None: id=pyid(self) exp=0 sub=None output=data.append # Add prefix output('<tr>') if level: output('<td></td>' * level) # Add tree expand/contract icon if items: output('<td valign=top>') for i in range(len(substate)): sub=substate[i] if sub[0]==id: exp=i+1 break if exp: del substate[exp-1] output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoMinus)) substate.append(sub) else: substate.append([id]) output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoPlus)) del substate[-1] else: output('<td>') output('</td>\n') # add item text output('<td colspan=%s valign=top>' % colspan) output(section(self, md)) output('</td></tr>\n') if exp: for item in items: if len(sub)==1: sub.append([]) data=tpRenderTABLE(item, root_url,url,state,sub[1],data, colspan, section, md, treeData, level+1) if not sub[1]: del sub[1] return data | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=None if id is None: try: id=self._p_oid except: id=None if id is None: id=pyid(self) exp=0 sub=None output=data.append # Add prefix output('<tr>') if level: output('<td></td>' * level) # Add tree expand/contract icon if items: output('<td valign=top>') for i in range(len(substate)): sub=substate[i] if sub[0]==id: exp=i+1 break if exp: del substate[exp-1] output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoMinus)) substate.append(sub) else: substate.append([id]) output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoPlus)) del substate[-1] else: output('<td>') output('</td>\n') # add item text output('<td colspan=%s valign=top>' % colspan) output(section(self, md)) output('</td></tr>\n') if exp: for item in items: if len(sub)==1: sub.append([]) data=tpRenderTABLE(item, root_url,url,state,sub[1],data, colspan, section, md, treeData, level+1) if not sub[1]: del sub[1] return data | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
||
output('<td>') output('</td>\n') | output('<TD WIDTH="16">') output('</TD>\n') | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=None if id is None: try: id=self._p_oid except: id=None if id is None: id=pyid(self) exp=0 sub=None output=data.append # Add prefix output('<tr>') if level: output('<td></td>' * level) # Add tree expand/contract icon if items: output('<td valign=top>') for i in range(len(substate)): sub=substate[i] if sub[0]==id: exp=i+1 break if exp: del substate[exp-1] output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoMinus)) substate.append(sub) else: substate.append([id]) output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoPlus)) del substate[-1] else: output('<td>') output('</td>\n') # add item text output('<td colspan=%s valign=top>' % colspan) output(section(self, md)) output('</td></tr>\n') if exp: for item in items: if len(sub)==1: sub.append([]) data=tpRenderTABLE(item, root_url,url,state,sub[1],data, colspan, section, md, treeData, level+1) if not sub[1]: del sub[1] return data | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
output('<td colspan=%s valign=top>' % colspan) | output('<TD COLSPAN="%s" VALIGN="TOP">' % (colspan-level)) | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=None if id is None: try: id=self._p_oid except: id=None if id is None: id=pyid(self) exp=0 sub=None output=data.append # Add prefix output('<tr>') if level: output('<td></td>' * level) # Add tree expand/contract icon if items: output('<td valign=top>') for i in range(len(substate)): sub=substate[i] if sub[0]==id: exp=i+1 break if exp: del substate[exp-1] output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoMinus)) substate.append(sub) else: substate.append([id]) output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoPlus)) del substate[-1] else: output('<td>') output('</td>\n') # add item text output('<td colspan=%s valign=top>' % colspan) output(section(self, md)) output('</td></tr>\n') if exp: for item in items: if len(sub)==1: sub.append([]) data=tpRenderTABLE(item, root_url,url,state,sub[1],data, colspan, section, md, treeData, level+1) if not sub[1]: del sub[1] return data | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
output('</td></tr>\n') | output('</TD>\n</TR>\n') | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=None if id is None: try: id=self._p_oid except: id=None if id is None: id=pyid(self) exp=0 sub=None output=data.append # Add prefix output('<tr>') if level: output('<td></td>' * level) # Add tree expand/contract icon if items: output('<td valign=top>') for i in range(len(substate)): sub=substate[i] if sub[0]==id: exp=i+1 break if exp: del substate[exp-1] output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoMinus)) substate.append(sub) else: substate.append([id]) output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoPlus)) del substate[-1] else: output('<td>') output('</td>\n') # add item text output('<td colspan=%s valign=top>' % colspan) output(section(self, md)) output('</td></tr>\n') if exp: for item in items: if len(sub)==1: sub.append([]) data=tpRenderTABLE(item, root_url,url,state,sub[1],data, colspan, section, md, treeData, level+1) if not sub[1]: del sub[1] return data | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=None if id is None: try: id=self._p_oid except: id=None if id is None: id=pyid(self) exp=0 sub=None output=data.append # Add prefix output('<tr>') if level: output('<td></td>' * level) # Add tree expand/contract icon if items: output('<td valign=top>') for i in range(len(substate)): sub=substate[i] if sub[0]==id: exp=i+1 break if exp: del substate[exp-1] output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoMinus)) substate.append(sub) else: substate.append([id]) output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoPlus)) del substate[-1] else: output('<td>') output('</td>\n') # add item text output('<td colspan=%s valign=top>' % colspan) output(section(self, md)) output('</td></tr>\n') if exp: for item in items: if len(sub)==1: sub.append([]) data=tpRenderTABLE(item, root_url,url,state,sub[1],data, colspan, section, md, treeData, level+1) if not sub[1]: del sub[1] return data | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py |
||
icoSpace='<IMG SRC="%s/TreeDisplay/Blank_icon.gif" ' \ ' BORDER="0">' % SOFTWARE_URL icoPlus ='<IMG SRC="%s/TreeDisplay/Plus_icon.gif" BORDER="0"' \ ' ALT="+">' % SOFTWARE_URL icoMinus='<IMG SRC="%s/TreeDisplay/Minus_icon.gif" BORDER="0"' \ ' ALT="-">' % SOFTWARE_URL | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0): # We are being called from above try: items=self.tpValues() except: items=None tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url try: id=self.tpId() except: id=None if id is None: try: id=self._p_oid except: id=None if id is None: id=pyid(self) exp=0 sub=None output=data.append # Add prefix output('<tr>') if level: output('<td></td>' * level) # Add tree expand/contract icon if items: output('<td valign=top>') for i in range(len(substate)): sub=substate[i] if sub[0]==id: exp=i+1 break if exp: del substate[exp-1] output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoMinus)) substate.append(sub) else: substate.append([id]) output('<A HREF="%s?state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoPlus)) del substate[-1] else: output('<td>') output('</td>\n') # add item text output('<td colspan=%s valign=top>' % colspan) output(section(self, md)) output('</td></tr>\n') if exp: for item in items: if len(sub)==1: sub.append([]) data=tpRenderTABLE(item, root_url,url,state,sub[1],data, colspan, section, md, treeData, level+1) if not sub[1]: del sub[1] return data | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.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.