rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
" "
"""Provide a namspace for product "methods" """
def __bobo_traverse__(self, REQUEST, name): product=self.aq_acquire('_getProducts')()._product(name) dispatcher=FactoryDispatcher(product, self.aq_parent, REQUEST) return dispatcher.__of__(self)
a593fea82fd275dda0573d6b643f08fb9cf2e980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a593fea82fd275dda0573d6b643f08fb9cf2e980/FactoryDispatcher.py
try out the query, <a href="%s">click hear</a>.
try out the query, <a href="%s">click here</a>.
def manage_addZSearch(self, report_id, report_title, report_style, input_id, input_title, queries=[], REQUEST=None): 'add a report' if not queries: raise ValueError, ( 'No <em>searchable objects</em> were selected') if not report_id: raise ValueError, ( 'No <em>report id</em> were specified') if input_title and not ...
b9165f07608a289ec21bf487be71fd63f59c07d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b9165f07608a289ec21bf487be71fd63f59c07d9/Search.py
self.munge(file.read())
if type(file) is not type(''): file=file.read() self.munge(file)
def manage_upload(self,file='', REQUEST=None): """Replace the contents of the document with the text in file.""" self._validateProxy(REQUEST) self.munge(file.read()) if REQUEST: return MessageDialog( title ='Success!', message='Your changes have been saved', action ='manage_main')
2f3bb36458683a5b36f69808ada85c2ec340fb10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2f3bb36458683a5b36f69808ada85c2ec340fb10/DTMLMethod.py
ms=string.split(ms, ';')[0]
ms=split(ms, ';')[0]
def _init_headers(self, request, response): # Attempt to handle If-Modified-Since headers. ms=request.get_header('If-Modified-Since', None) if ms is not None: ms=string.split(ms, ';')[0] ms=DateTime(ms).timeTime() if self.lmt > ms: RESPONSE.setStatus(304) return RESPONSE response.setHeader('Content-Type', self.content_...
a9030504ffed9d20e170907b2460b8cecf2469d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a9030504ffed9d20e170907b2460b8cecf2469d0/ImageFile.py
RESPONSE.setHeader('Content-type','application/data') RESPONSE.setHeader('Content-Disposition', 'inline;filename=%s.%s' % (id, suffix))
if RESPONSE is not None: RESPONSE.setHeader('Content-type','application/data') RESPONSE.setHeader('Content-Disposition', 'inline;filename=%s.%s' % (id, suffix))
def manage_exportObject(self, id='', download=None, toxml=None, RESPONSE=None): """Exports an object to a file and returns that file.""" if not id: # can't use getId() here (breaks on "old" exported objects) id=self.id if hasattr(id, 'im_func'): id=id() ob=self else: ob=self._getOb(id)
a78f509aea5675cb1d229a42deaca449cf1e11c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a78f509aea5675cb1d229a42deaca449cf1e11c2/ObjectManager.py
raise 'Bad Request', 'Invalid file name %s' % file
raise BadRequestException, 'Invalid file name %s' % file
def manage_importObject(self, file, REQUEST=None, set_owner=1): """Import an object from a file""" dirname, file=os.path.split(file) if dirname: raise 'Bad Request', 'Invalid file name %s' % file
a78f509aea5675cb1d229a42deaca449cf1e11c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a78f509aea5675cb1d229a42deaca449cf1e11c2/ObjectManager.py
raise 'Bad Request', 'File does not exist: %s' % file
raise BadRequestException, 'File does not exist: %s' % file
def manage_importObject(self, file, REQUEST=None, set_owner=1): """Import an object from a file""" dirname, file=os.path.split(file) if dirname: raise 'Bad Request', 'Invalid file name %s' % file
a78f509aea5675cb1d229a42deaca449cf1e11c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a78f509aea5675cb1d229a42deaca449cf1e11c2/ObjectManager.py
RESPONSE.redirect(SCRIPT_NAME+'HelpSys/hs_index')
RESPONSE.redirect(SCRIPT_NAME+'/HelpSys/hs_index')
def manage_help(self, RESPONSE, SCRIPT_NAME): "Help!" RESPONSE.redirect(SCRIPT_NAME+'HelpSys/hs_index') return ''
9bebeb24945e09dc3f2728adee8070daded1c95d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9bebeb24945e09dc3f2728adee8070daded1c95d/Management.py
help_option_=({'label': 'Help', 'action': 'manage_help'},),
help_option_=({'label': 'Help', 'action': 'manage_help', },),
def filtered_manage_options( self, REQUEST=None, help_option_=({'label': 'Help', 'action': 'manage_help'},), ): if REQUEST is None: if hasattr(self, 'REQUEST'): REQUEST=self.REQUEST try: user=REQUEST['AUTHENTICATED_USER'] except: user=None result=[] seen_roles={}
9bebeb24945e09dc3f2728adee8070daded1c95d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9bebeb24945e09dc3f2728adee8070daded1c95d/Management.py
self._info = self._setupDB('info')
def _setupDBs(self): # Data Type Assumptions: # # - Object ids (oid) are 8-bytes # - Objects have revisions, with each revision being identified by a # unique serial number. We sometimes refer to 16-byte strings of # oid+serial as a revision id. # - Transaction ids (tid) are 8-bytes # - Version ids (vid) are 8-byt...
80e75665c329591976bf34c0866815d4110a4a16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/80e75665c329591976bf34c0866815d4110a4a16/BDBFullStorage.py
self._oids.truncate(txn)
def _docommit(self, txn, tid): self._pending.put(self._serial, COMMIT, txn) # Almost all the data's already written by now so we don't need to do # much more than update reference counts. Even there, our work is # easy because we're not going to decref anything here. deltas = {} co = cs = None try: co = self._oids.cur...
80e75665c329591976bf34c0866815d4110a4a16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/80e75665c329591976bf34c0866815d4110a4a16/BDBFullStorage.py
_stupid_dest(format_exception(
_stupid_dest.write(format_exception(
def stupid_log_write(subsystem, severity, summary, detail, error): if severity < 0: return global _stupid_dest if _stupid_dest is None: import os if os.environ.has_key('STUPID_LOG_FILE'): f=os.environ['STUPID_LOG_FILE'] if f: _stupid_dest=open(f,'a') else: import sys _stupid_dest=sys.stderr else: _stupid_dest=_no_stu...
c222ef9a51ed468e124f5d72b36b93472e35cb7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c222ef9a51ed468e124f5d72b36b93472e35cb7c/zLOG.py
_stupid_dest("%s: %s\n" % error[:2])
_stupid_dest.write("%s: %s\n" % error[:2])
def stupid_log_write(subsystem, severity, summary, detail, error): if severity < 0: return global _stupid_dest if _stupid_dest is None: import os if os.environ.has_key('STUPID_LOG_FILE'): f=os.environ['STUPID_LOG_FILE'] if f: _stupid_dest=open(f,'a') else: import sys _stupid_dest=sys.stderr else: _stupid_dest=_no_stu...
c222ef9a51ed468e124f5d72b36b93472e35cb7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c222ef9a51ed468e124f5d72b36b93472e35cb7c/zLOG.py
self.headers[n]=value
self.headers[name]=value
def setHeader(self, name, value): self.headers[n]=value
9f9b7a24d55086a04c10843626094b465611634b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9f9b7a24d55086a04c10843626094b465611634b/BaseResponse.py
result=self.getUser(id) return result.__of__(self)
return self.getUser(id)
def getUserById(self, id, default=_marker): """Return the user corresponding to the given id. """ # The connection between getting by ID and by name is not a strong # one try: result=self.getUser(id) return result.__of__(self) # Wrap in our context except: if default is _marker: raise return default
99272e487ca4223ec3efc995fdf17d7add020fdd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/99272e487ca4223ec3efc995fdf17d7add020fdd/User.py
('index_html', 'tag', 'view_image_or_file', 'getSize',
('index_html', 'view_image_or_file', 'getSize',
def manage_addFile(self,id,file='',title='',precondition='', content_type='', REQUEST=None): """Add a new File object. Creates a new File object 'id' with the contents of 'file'""" id, title = cookId(id, title, file) self=self.this() # First, we create the file without data: self._setObject(id, File(id,title,'',con...
bb92612264edb3b60804857c5d923bcd563641bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/bb92612264edb3b60804857c5d923bcd563641bc/Image.py
LOG('Transience', WARNING, ('Transient object container %s max subobjects ' 'reached' % self.getId()) )
LOG.warn('Transient object container %s max subobjects ' 'reached' % self.getId())
def __setitem__(self, k, v): DEBUG and TLOG('__setitem__: called with key %s, value %s' % (k,v)) if self._timeout_slices: current_ts = getCurrentTimeslice(self._period) else: current_ts = 0 item = self._move_item(k, current_ts, _marker) STRICT and _assert(self._data.has_key(current_ts)) if item is _marker: # the key di...
791ea4a915270f180becd9581650dc98d0d998e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/791ea4a915270f180becd9581650dc98d0d998e4/Transience.py
LOG('Transience', WARNING, err % (callback, '/'.join(path)), error=sys.exc_info() )
LOG.warn(err % (callback, '/'.join(path)), exc_info=sys.exc_info())
def _getCallback(self, callback): if not callback: return None if type(callback) is type(''): try: method = self.unrestrictedTraverse(callback) except (KeyError, AttributeError): path = self.getPhysicalPath() err = 'No such onAdd/onDelete method %s referenced via %s' LOG('Transience', WARNING, err % (callback, '/'.join...
791ea4a915270f180becd9581650dc98d0d998e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/791ea4a915270f180becd9581650dc98d0d998e4/Transience.py
LOG('Transience', WARNING, '%s failed when calling %s in %s' % (name,callback, '/'.join(path)), error=sys.exc_info() )
LOG.warn('%s failed when calling %s in %s' % (name,callback, '/'.join(path)), exc_info=sys.exc_info())
def _notify(self, item, callback, name): if callable(callback): sm = getSecurityManager() try: user = sm.getUser() try: newSecurityManager(None, nobody) callback(item, self) except: # dont raise, just log path = self.getPhysicalPath() LOG('Transience', WARNING, '%s failed when calling %s in %s' % (name,callback, '/'.jo...
791ea4a915270f180becd9581650dc98d0d998e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/791ea4a915270f180becd9581650dc98d0d998e4/Transience.py
LOG('Transience', WARNING, err % (name, '/'.join(path), callback), error=sys.exc_info() )
LOG.warn(err % (name, '/'.join(path), callback), exc_info=sys.exc_info())
def _notify(self, item, callback, name): if callable(callback): sm = getSecurityManager() try: user = sm.getUser() try: newSecurityManager(None, nobody) callback(item, self) except: # dont raise, just log path = self.getPhysicalPath() LOG('Transience', WARNING, '%s failed when calling %s in %s' % (name,callback, '/'.jo...
791ea4a915270f180becd9581650dc98d0d998e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/791ea4a915270f180becd9581650dc98d0d998e4/Transience.py
return Globals.Bobobase['roles']
return self.validRoles()
def roleNames(self):
03ea3d634dad01c0a360c366495b082d479be0ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/03ea3d634dad01c0a360c366495b082d479be0ad/User.py
if not headers.has_key('content-type') and self.status == 200: self.setStatus('nocontent')
def __str__(self, html_search=regex.compile('<html>',regex.casefold).search, ): if self._wrote: return '' # Streaming output was used.
a925db54a85961bd5dbc4796caea38cd3a2b8842 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a925db54a85961bd5dbc4796caea38cd3a2b8842/HTTPResponse.py
clip_data='',REQUEST):
clip_data='',REQUEST=None):
def manage_delObjects(self,ids=[],submit='',clip_id='', clip_data='',REQUEST):
cdb01db9a51220abc79c0c4f82587a840291749d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/cdb01db9a51220abc79c0c4f82587a840291749d/ObjectManager.py
self.parser = None
self.parser = self.feed = None
def close(self): try: self.parser.close() finally: self.parser = None # nuke circular reference
f3d2bed37601fc63f5fdc5186947ed6c075aa046 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f3d2bed37601fc63f5fdc5186947ed6c075aa046/xmlrpclib.py
This method will cause this object to get reindexed. Of this
This method will cause this object to get reindexed. If this
def reindex_all(self, obj=None): """
81e8827b3f635cfb7e8ebbdac33846cef76e8985 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/81e8827b3f635cfb7e8ebbdac33846cef76e8985/CatalogAwarenessInterface.py
if SUPPORTS_WEBDAV_LOCKS: __implements__ = (WriteLockInterface,)
__implements__ = (WriteLockInterface,)
def __call__(self, REQUEST, RESPONSE): " " return self.document_src(REQUEST)
f2ef0f2f16bbaf45b36f5477dd3688c339382292 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f2ef0f2f16bbaf45b36f5477dd3688c339382292/ZopePageTemplate.py
if SUPPORTS_WEBDAV_LOCKS and self.wl_isLocked():
if self.wl_isLocked():
def pt_editAction(self, REQUEST, title, text, content_type, expand): """Change the title and document.""" if SUPPORTS_WEBDAV_LOCKS and self.wl_isLocked(): raise ResourceLockedError, "File is locked via WebDAV" self.expand=expand self.pt_setTitle(title) self.pt_edit(text, content_type) REQUEST.set('text', self.read()) #...
f2ef0f2f16bbaf45b36f5477dd3688c339382292 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f2ef0f2f16bbaf45b36f5477dd3688c339382292/ZopePageTemplate.py
if SUPPORTS_WEBDAV_LOCKS and self.wl_isLocked():
if self.wl_isLocked():
def pt_upload(self, REQUEST, file='', charset=None): """Replace the document with the text in file.""" if SUPPORTS_WEBDAV_LOCKS and self.wl_isLocked(): raise ResourceLockedError, "File is locked via WebDAV"
f2ef0f2f16bbaf45b36f5477dd3688c339382292 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f2ef0f2f16bbaf45b36f5477dd3688c339382292/ZopePageTemplate.py
if SUPPORTS_WEBDAV_LOCKS: self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1)
self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1)
def PUT(self, REQUEST, RESPONSE): """ Handle HTTP PUT requests """ self.dav__init(REQUEST, RESPONSE) if SUPPORTS_WEBDAV_LOCKS: self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1) self.write(REQUEST.get('BODY', '')) RESPONSE.setStatus(204) return RESPONSE
f2ef0f2f16bbaf45b36f5477dd3688c339382292 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f2ef0f2f16bbaf45b36f5477dd3688c339382292/ZopePageTemplate.py
if not SUPPORTS_WEBDAV_LOCKS: def wl_isLocked(self): return 0
def pt_source_file(self): """Returns a file name to be compiled into the TAL code.""" try: return '/'.join(self.getPhysicalPath()) except: # This page template is being compiled without an # acquisition context, so we don't know where it is. :-( return None
f2ef0f2f16bbaf45b36f5477dd3688c339382292 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f2ef0f2f16bbaf45b36f5477dd3688c339382292/ZopePageTemplate.py
examples_path = os.path.join(Globals.data_dir, 'Examples.zexp')
examples_path = os.path.join(Globals.INSTANCE_HOME, 'import', 'Examples.zexp')
def initialize(app): # Initialize the application # Initialize the cache: app.Control_Panel.initialize_cache() # The following items marked b/c are backward compatibility hacks # which make sure that expected system objects are added to the # bobobase. This is required because the bobobase in use may pre- # date the ...
8d4b0eb4deeaa6a82d3c4fde25b6e3478dafb8ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8d4b0eb4deeaa6a82d3c4fde25b6e3478dafb8ef/Application.py
product_names.remove("PluginIndexes") product_names.insert(0,"PluginIndexes")
if "PluginIndexes" in product_names: product_names.remove("PluginIndexes") product_names.insert(0,"PluginIndexes")
def import_products(): # Try to import each product, checking for and catching errors. done={} for product_dir in Products.__path__: product_names=os.listdir(product_dir) product_names.sort() # Hack !!! # We must initialize the PluginIndexes first before # all other products (ajung) product_names.remove("PluginInde...
f2c505d6975a0bdc107e97d308f0d86aacebc8bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f2c505d6975a0bdc107e97d308f0d86aacebc8bb/Application.py
product_names.remove("PluginIndexes") product_names.insert(0,"PluginIndexes")
if "PluginIndexes" in product_names: product_names.remove("PluginIndexes") product_names.insert(0,"PluginIndexes")
def install_products(app): # Install a list of products into the basic folder class, so # that all folders know about top-level objects, aka products folder_permissions = get_folder_permissions() meta_types=[] done={} get_transaction().note('Prior to product installs') get_transaction().commit() for product_dir in P...
f2c505d6975a0bdc107e97d308f0d86aacebc8bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f2c505d6975a0bdc107e97d308f0d86aacebc8bb/Application.py
BUILD_BASE=os.path.join(os.getcwd(), 'build-base')
BUILD_BASE=os.path.join(os.getcwd(), 'build-base', 'python-%s.%s' % sys.version_info[:2])
def main(): # below assumes this script is in the BASE_DIR/inst directory global PREFIX BASE_DIR=os.path.abspath(os.path.dirname(os.path.dirname(sys.argv[0]))) BUILD_BASE=os.path.join(os.getcwd(), 'build-base') PYTHON=sys.executable MAKEFILE=open(os.path.join(BASE_DIR, 'inst', IN_MAKEFILE)).read() REQUIRE_LF_ENABLED = ...
4c4e9ebfb122024d2ba9a6fcdfb6d8dbbe22e2b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4c4e9ebfb122024d2ba9a6fcdfb6d8dbbe22e2b5/configure.py
try: return d[key] except KeyError, AttributeError: pass
try: return d[key] except (KeyError, AttributeError): pass
def __getitem__(self, key): for d in self.dicts: try: return d[key] except KeyError, AttributeError: pass raise KeyError, key
4ca1105a43cc9259bcab8a940fdb62f8d5c0d618 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4ca1105a43cc9259bcab8a940fdb62f8d5c0d618/pDocumentTemplate.py
if name and name[:1] in '@+':
if name and name[:1] in '@+' and name != '+':
def unrestrictedTraverse(self, path, default=_marker, restricted=False): """Lookup an object by path.
7a52c20df63640f18c3d99246a2961ffa6558742 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/7a52c20df63640f18c3d99246a2961ffa6558742/Traversable.py
einfo = sys.exc_info() if type(einfo[0])==type(''): errname = einfo[0]
t,v = sys.exc_info()[:2] if type(t)==type(''): errname = t
def render(self, md): # first we try to render the first block try: return render_blocks(self.section, md) except: # but an error occurs.. save the info. einfo = sys.exc_info() if type(einfo[0])==type(''): errname = einfo[0] else: errname = einfo[0].__name__
e5fa056505edfb80e052e4d5b196c1c09b21fa20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e5fa056505edfb80e052e4d5b196c1c09b21fa20/DT_Try.py
errname = einfo[0].__name__
errname = t.__name__
def render(self, md): # first we try to render the first block try: return render_blocks(self.section, md) except: # but an error occurs.. save the info. einfo = sys.exc_info() if type(einfo[0])==type(''): errname = einfo[0] else: errname = einfo[0].__name__
e5fa056505edfb80e052e4d5b196c1c09b21fa20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e5fa056505edfb80e052e4d5b196c1c09b21fa20/DT_Try.py
handler = self.find_handler(einfo[0])
handler = self.find_handler(t)
def render(self, md): # first we try to render the first block try: return render_blocks(self.section, md) except: # but an error occurs.. save the info. einfo = sys.exc_info() if type(einfo[0])==type(''): errname = einfo[0] else: errname = einfo[0].__name__
e5fa056505edfb80e052e4d5b196c1c09b21fa20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e5fa056505edfb80e052e4d5b196c1c09b21fa20/DT_Try.py
ns = namespace(self, error_type=errname, error_value=einfo[1],
ns = namespace(self, error_type=errname, error_value=v,
def render(self, md): # first we try to render the first block try: return render_blocks(self.section, md) except: # but an error occurs.. save the info. einfo = sys.exc_info() if type(einfo[0])==type(''): errname = einfo[0] else: errname = einfo[0].__name__
e5fa056505edfb80e052e4d5b196c1c09b21fa20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e5fa056505edfb80e052e4d5b196c1c09b21fa20/DT_Try.py
doc(person=person)
doc(person=person())
def testNoImplicitAccess(self): class person: name='Jim'
58712c56d0f50510ea4f1bf3f69235a906e4a402 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/58712c56d0f50510ea4f1bf3f69235a906e4a402/testSecurity.py
import os
def stupid_log_write(subsystem, severity, summary, detail, error): if severity < 0: return global _stupid_dest if _stupid_dest is None: import os if os.environ.has_key('STUPID_LOG_FILE'): f=os.environ['STUPID_LOG_FILE'] if f: _stupid_dest=open(f,'a') else: import sys _stupid_dest=sys.stderr else: _stupid_dest=_no_stup...
4461148eb35b7c756329ac4d705f5460f116fcb4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4461148eb35b7c756329ac4d705f5460f116fcb4/stupidFileLogger.py
else: import sys _stupid_dest=sys.stderr
else: _stupid_dest=sys.stderr elif os.environ.get('Z_DEBUG_MODE',0): _stupid_dest=sys.stderr
def stupid_log_write(subsystem, severity, summary, detail, error): if severity < 0: return global _stupid_dest if _stupid_dest is None: import os if os.environ.has_key('STUPID_LOG_FILE'): f=os.environ['STUPID_LOG_FILE'] if f: _stupid_dest=open(f,'a') else: import sys _stupid_dest=sys.stderr else: _stupid_dest=_no_stup...
4461148eb35b7c756329ac4d705f5460f116fcb4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4461148eb35b7c756329ac4d705f5460f116fcb4/stupidFileLogger.py
import os if os.environ.has_key('Z_DEBUG_MODE'): import sys sys.stderr.write( "------\n" "%s %s %s %s\n%s" % (log_time(), severity_string(severity), subsystem, summary, detail, ) ) sys.stderr.flush()
def stupid_log_write(subsystem, severity, summary, detail, error): if severity < 0: return global _stupid_dest if _stupid_dest is None: import os if os.environ.has_key('STUPID_LOG_FILE'): f=os.environ['STUPID_LOG_FILE'] if f: _stupid_dest=open(f,'a') else: import sys _stupid_dest=sys.stderr else: _stupid_dest=_no_stup...
4461148eb35b7c756329ac4d705f5460f116fcb4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4461148eb35b7c756329ac4d705f5460f116fcb4/stupidFileLogger.py
def _checkId(self, id, allow_dup=1, _reserved=('propertysheets',)):
def _checkId(self, id, allow_dup=0, _reserved=('propertysheets','manage_workspace')):
def _checkId(self, id, allow_dup=1, _reserved=('propertysheets',)): if id in _reserved: raise 'Bad Request', 'The id, %s, is reseverd' % id ZClassMethodsSheet.inheritedAttribute('_checkId')( self, id, allow_dup) return id+' '
45c0f29c1f1effc7eee93e8b5df6e753c66c3b8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/45c0f29c1f1effc7eee93e8b5df6e753c66c3b8d/Method.py
self, id, allow_dup)
self, id, 0)
def _checkId(self, id, allow_dup=1, _reserved=('propertysheets',)): if id in _reserved: raise 'Bad Request', 'The id, %s, is reseverd' % id ZClassMethodsSheet.inheritedAttribute('_checkId')( self, id, allow_dup) return id+' '
45c0f29c1f1effc7eee93e8b5df6e753c66c3b8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/45c0f29c1f1effc7eee93e8b5df6e753c66c3b8d/Method.py
data=(headers is None) and file or file.read()
if hasattr(file, 'read'): data=file.read() else: data=file
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 data=(headers is None) and file or file.read() if headers and headers.has_key('content-type') and (not content_type): content_...
915ef3fec4d91a9391c929aa5a1122169de9c075 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/915ef3fec4d91a9391c929aa5a1122169de9c075/Image.py
def positions(self, docid, words):
def positions(self, docid, words, obj):
def positions(self, docid, words): """Return the positions in the document for the given document id of the word, word.""" id = self.id
d1f544bec4a452ed42c765c9b0b6e59222700b15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d1f544bec4a452ed42c765c9b0b6e59222700b15/UnTextIndex.py
row = self._data[docid]
def positions(self, docid, words): """Return the positions in the document for the given document id of the word, word.""" id = self.id
d1f544bec4a452ed42c765c9b0b6e59222700b15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d1f544bec4a452ed42c765c9b0b6e59222700b15/UnTextIndex.py
doc = str(f(row, id)())
doc = str(f(obj, id)())
def positions(self, docid, words): """Return the positions in the document for the given document id of the word, word.""" id = self.id
d1f544bec4a452ed42c765c9b0b6e59222700b15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d1f544bec4a452ed42c765c9b0b6e59222700b15/UnTextIndex.py
doc = str(f(row, id))
doc = str(f(obj, id))
def positions(self, docid, words): """Return the positions in the document for the given document id of the word, word.""" id = self.id
d1f544bec4a452ed42c765c9b0b6e59222700b15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d1f544bec4a452ed42c765c9b0b6e59222700b15/UnTextIndex.py
db.SetCacheSize(self._cache_size) db.SetCacheDeactivateAfter(self._cache_age) db.SetVersionCacheSize(self._vcache_size) db.SetVersionCacheDeactivateAfter(self._vcache_age)
db.setCacheSize(self._cache_size) db.setCacheDeactivateAfter(self._cache_age) db.setVersionCacheSize(self._vcache_size) db.setVersionCacheDeactivateAfter(self._vcache_age)
def initialize_cache(self): try: db=self._p_jar.db() except: # BoboPOS2 Globals.Bobobase._jar.cache.cache_size=self._cache_size Globals.Bobobase._jar.cache.cache_age =self._cache_age else: db.SetCacheSize(self._cache_size) db.SetCacheDeactivateAfter(self._cache_age) db.SetVersionCacheSize(self._vcache_size) db.SetVersi...
98ddd7dcfba754f4ee2019cd3e30c3bec9b42555 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/98ddd7dcfba754f4ee2019cd3e30c3bec9b42555/CacheManager.py
"""Object delete handler."""
"""Object delete handler. I think this is obsoleted by manage_beforeDelete """
def onDeleteObject(self): """Object delete handler.""" self.unindex_object()
20adcffda5ca4f0567b09597e585eaf7064daaff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/20adcffda5ca4f0567b09597e585eaf7064daaff/CatalogAwareness.py
options=[] for option in c.manage_options: copy={} copy.update(option) options.append(copy) c.manage_options=tuple(options)
if zope_object: options=[] for option in c.manage_options: copy={} copy.update(option) options.append(copy) c.manage_options=tuple(options)
def __init__(self, id, title, bases, zope_object=1): """Build a Zope class
028d8f2e7b62d61ef43f99fd5edd0bb458cfff33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/028d8f2e7b62d61ef43f99fd5edd0bb458cfff33/ZClass.py
def pt_macro(self):
def pt_macros(self):
def pt_macro(self): self._cook_check() return PageTemplate.pt_macro(self)
3fd48d78a9b5b8e3bdf4ac432ed95f398666e41c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3fd48d78a9b5b8e3bdf4ac432ed95f398666e41c/PageTemplateFile.py
return PageTemplate.pt_macro(self)
return PageTemplate.pt_macros(self)
def pt_macro(self): self._cook_check() return PageTemplate.pt_macro(self)
3fd48d78a9b5b8e3bdf4ac432ed95f398666e41c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3fd48d78a9b5b8e3bdf4ac432ed95f398666e41c/PageTemplateFile.py
k=None
def sort_sequence(self, sequence):
3fa0fa5665fe071d344440bd281e9660beb9fa74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3fa0fa5665fe071d344440bd281e9660beb9fa74/DT_In.py
if mapping: k=v[sort] else: k=getattr(v, sort) if not basic_type(k): try: k=k() except: pass
if multsort: k = [] for sk in sortfields: try: if mapping: akey = v[sk] else: akey = getattr(v, sk) except AttributeError, KeyError: akey = None if not basic_type(akey): try: akey = akey() except: pass k.append(akey) else: try: if mapping: k = v[sort] else: k = getattr(v, sort) except AttributeError, KeyError: k = None...
def sort_sequence(self, sequence):
3fa0fa5665fe071d344440bd281e9660beb9fa74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3fa0fa5665fe071d344440bd281e9660beb9fa74/DT_In.py
for k, client in s: sequence.append(client)
for k, client in s: sequence.append(client)
def sort_sequence(self, sequence):
3fa0fa5665fe071d344440bd281e9660beb9fa74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3fa0fa5665fe071d344440bd281e9660beb9fa74/DT_In.py
def sort_sequence(self, sequence):
3fa0fa5665fe071d344440bd281e9660beb9fa74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3fa0fa5665fe071d344440bd281e9660beb9fa74/DT_In.py
basic_type={type(''): 1, type(0): 1, type(0.0): 1, type(()): 1, type([]): 1 }.has_key
basic_type={type(''): 1, type(0): 1, type(0.0): 1, type(()): 1, type([]): 1, type(None) : 1 }.has_key
def reverse_sequence(self, sequence): s=list(sequence) s.reverse() return s
3fa0fa5665fe071d344440bd281e9660beb9fa74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3fa0fa5665fe071d344440bd281e9660beb9fa74/DT_In.py
e=e+1
def __getitem__(self,index):
afb0beb00ba813cff48fdf0ea19af5e4f3d75908 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/afb0beb00ba813cff48fdf0ea19af5e4f3d75908/Zope.py
except Unauthorized, vv:
except 'Unauthorized', vv:
def __getitem__(self,index):
afb0beb00ba813cff48fdf0ea19af5e4f3d75908 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/afb0beb00ba813cff48fdf0ea19af5e4f3d75908/Zope.py
continue if skip and not getSecurityManager().checkPermission(skip, v): continue if test is None or test(v): data.append(v) ind=ind+1
skip_this = 1 else: skip_this = 0
def __getitem__(self,index):
afb0beb00ba813cff48fdf0ea19af5e4f3d75908 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/afb0beb00ba813cff48fdf0ea19af5e4f3d75908/Zope.py
do("chown %s %s" % (group, path), 0)
do("chown %s %s" % (user, path), 0)
def ch(path, user, group, mode=0600): if group: mode=mode+060 do("chgrp %s %s" % (group, path), 0) if user: do("chown %s %s" % (group, path), 0) do("chmod %s %s" % (oct(mode), path), 0)
c49d60285cb594bbf48acff444472d3236505d23 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c49d60285cb594bbf48acff444472d3236505d23/do.py
if not hasattr(app.Control_Panel, 'Products'):
if not hasattr(app.Control_Panel.aq_base, 'Products'):
def open_bobobase(): # Open the application database Bobobase=Globals.Bobobase=Globals.PickleDictionary(Globals.BobobaseName) product_dir=os.path.join(SOFTWARE_HOME,'lib/python/Products') __traceback_info__=sys.path try: app=Bobobase['Application'] except KeyError: app=Application() app._init() Bobobase['Applicatio...
656beed426a6f7a0a8b802e580b6bfaddc634715 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/656beed426a6f7a0a8b802e580b6bfaddc634715/Application.py
from types import BooleanType
def guarded_getitem(object, index): v = object[index] if getSecurityManager().validate(object, object, index, v): return v raise Unauthorized, 'unauthorized access to element %s' % `i`
e04ad27486fef71c955bba35808f255f7768fbde /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e04ad27486fef71c955bba35808f255f7768fbde/Zope.py
if isinstance(v, StringType):
if isinstance(v, str):
def complex_marshal(pairs): '''Add request marshalling information to a list of name-value pairs. Names must be strings. Values may be strings, integers, floats, or DateTimes, and they may also be lists or namespaces containing these types. The list is edited in place so that each (name, value) pair becomes a (name,...
e04ad27486fef71c955bba35808f255f7768fbde /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e04ad27486fef71c955bba35808f255f7768fbde/Zope.py
elif isinstance(v, ListType):
elif isinstance(v, list):
def complex_marshal(pairs): '''Add request marshalling information to a list of name-value pairs. Names must be strings. Values may be strings, integers, floats, or DateTimes, and they may also be lists or namespaces containing these types. The list is edited in place so that each (name, value) pair becomes a (name,...
e04ad27486fef71c955bba35808f255f7768fbde /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e04ad27486fef71c955bba35808f255f7768fbde/Zope.py
if isinstance(v, StringType):
if isinstance(v, str):
def simple_marshal(v): if isinstance(v, StringType): return '' if isinstance(v, BooleanType): return ':boolean' if isinstance(v, IntType): return ':int' if isinstance(v, FloatType): return ':float' if isinstance(v, DateTime): return ':date' return ''
e04ad27486fef71c955bba35808f255f7768fbde /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e04ad27486fef71c955bba35808f255f7768fbde/Zope.py
if isinstance(v, BooleanType):
if isinstance(v, bool):
def simple_marshal(v): if isinstance(v, StringType): return '' if isinstance(v, BooleanType): return ':boolean' if isinstance(v, IntType): return ':int' if isinstance(v, FloatType): return ':float' if isinstance(v, DateTime): return ':date' return ''
e04ad27486fef71c955bba35808f255f7768fbde /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e04ad27486fef71c955bba35808f255f7768fbde/Zope.py
if isinstance(v, IntType):
if isinstance(v, int):
def simple_marshal(v): if isinstance(v, StringType): return '' if isinstance(v, BooleanType): return ':boolean' if isinstance(v, IntType): return ':int' if isinstance(v, FloatType): return ':float' if isinstance(v, DateTime): return ':date' return ''
e04ad27486fef71c955bba35808f255f7768fbde /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e04ad27486fef71c955bba35808f255f7768fbde/Zope.py
if isinstance(v, FloatType):
if isinstance(v, float):
def simple_marshal(v): if isinstance(v, StringType): return '' if isinstance(v, BooleanType): return ':boolean' if isinstance(v, IntType): return ':int' if isinstance(v, FloatType): return ':float' if isinstance(v, DateTime): return ':date' return ''
e04ad27486fef71c955bba35808f255f7768fbde /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e04ad27486fef71c955bba35808f255f7768fbde/Zope.py
elif os.environ.has_key('BOBO_DEBUG_MODE'): debug_mode=lower(os.environ['BOBO_DEBUG_MODE'])
elif (os.environ.has_key('Z_DEBUG_MODE') or os.environ.has_key('BOBO_DEBUG_MODE')): if os.environ.has_key('Z_DEBUG_MODE'): debug_mode=lower(os.environ['Z_DEBUG_MODE']) else: debug_mode=lower(os.environ['BOBO_DEBUG_MODE'])
def get_module_info(module_name, modules={}, acquire=_l.acquire, release=_l.release, ): if modules.has_key(module_name): return modules[module_name] if module_name[-4:]=='.cgi': module_name=module_name[:-4] acquire() tb=None try: try: module=__import__(module_name, globals(), globals(), ('__doc__',)) realm=module_n...
6820e9cef45a65ce52c2460a0cc4e80ebb7cb066 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6820e9cef45a65ce52c2460a0cc4e80ebb7cb066/Publish.py
def testResolveUrl(self): # Check that ResolveUrl really raises the same error
e90a36c2fdcac729f4ce506467132c38ce04e20a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e90a36c2fdcac729f4ce506467132c38ce04e20a/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
e90a36c2fdcac729f4ce506467132c38ce04e20a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e90a36c2fdcac729f4ce506467132c38ce04e20a/testHTTPRequest.py
ostream = tempfile.NamedTemporaryFile(suffix='.xml')
handle, path = tempfile.mkstemp(suffix='.xml')
def test_export_import_as_file_idempotent(self): from OFS.DTMLMethod import DTMLMethod from OFS.XMLExportImport import exportXML from OFS.XMLExportImport import importXML
4630a5bcfe9d964a5e40a9bb146aabf33974b639 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4630a5bcfe9d964a5e40a9bb146aabf33974b639/test_XMLExportImport.py
ostream.flush() newobj = importXML(connection, ostream.name)
ostream.close() newobj = importXML(connection, path) self.failUnless(isinstance(newobj, DTMLMethod)) self.assertEqual(newobj.read(), dm.read())
def test_export_import_as_file_idempotent(self): from OFS.DTMLMethod import DTMLMethod from OFS.XMLExportImport import exportXML from OFS.XMLExportImport import importXML
4630a5bcfe9d964a5e40a9bb146aabf33974b639 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4630a5bcfe9d964a5e40a9bb146aabf33974b639/test_XMLExportImport.py
ostream.close()
os.remove(path)
def test_export_import_as_file_idempotent(self): from OFS.DTMLMethod import DTMLMethod from OFS.XMLExportImport import exportXML from OFS.XMLExportImport import importXML
4630a5bcfe9d964a5e40a9bb146aabf33974b639 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4630a5bcfe9d964a5e40a9bb146aabf33974b639/test_XMLExportImport.py
self.failUnless(isinstance(newobj, DTMLMethod)) self.assertEqual(newobj.read(), dm.read())
def test_export_import_as_file_idempotent(self): from OFS.DTMLMethod import DTMLMethod from OFS.XMLExportImport import exportXML from OFS.XMLExportImport import importXML
4630a5bcfe9d964a5e40a9bb146aabf33974b639 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4630a5bcfe9d964a5e40a9bb146aabf33974b639/test_XMLExportImport.py
ostream = tempfile.NamedTemporaryFile(suffix='.xml')
handle, path = tempfile.mkstemp(suffix='.xml')
def test_OFS_ObjectManager__importObjectFromFile_xml(self): from OFS.DTMLMethod import DTMLMethod from OFS.Folder import Folder from OFS.XMLExportImport import exportXML
4630a5bcfe9d964a5e40a9bb146aabf33974b639 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4630a5bcfe9d964a5e40a9bb146aabf33974b639/test_XMLExportImport.py
ostream.flush() sub._importObjectFromFile(ostream.name, 0, 0)
ostream.close() sub._importObjectFromFile(path, 0, 0)
def test_OFS_ObjectManager__importObjectFromFile_xml(self): from OFS.DTMLMethod import DTMLMethod from OFS.Folder import Folder from OFS.XMLExportImport import exportXML
4630a5bcfe9d964a5e40a9bb146aabf33974b639 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4630a5bcfe9d964a5e40a9bb146aabf33974b639/test_XMLExportImport.py
ostream.close()
os.remove(path)
def test_OFS_ObjectManager__importObjectFromFile_xml(self): from OFS.DTMLMethod import DTMLMethod from OFS.Folder import Folder from OFS.XMLExportImport import exportXML
4630a5bcfe9d964a5e40a9bb146aabf33974b639 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4630a5bcfe9d964a5e40a9bb146aabf33974b639/test_XMLExportImport.py
except:
except:
def __init__( self, id, ignore_ex=None, call_methods=None, extra=None, caller=None): """Create an unindex
2625f93b9f104d03ce1e1bd98c54ccdf974fe837 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2625f93b9f104d03ce1e1bd98c54ccdf974fe837/UnIndex.py
if level > 3: output( '<TD COLSPAN="%s"></TD>' % (level-1)) elif level > 1: output('<TD></TD>' * (level-1)) output('<TD WIDTH="16"></TD>\n') output('<TD WIDTH="16" VALIGN="TOP">')
if level > 3: output(_td_colspan % (level-1)) elif level > 1: output(_td_single * (level-1)) output(_td_single) output('\n') output('<TD WIDTH="16" VALIGN="TOP" NOWRAP>')
def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data, colspan, section, md, treeData, level=0, args=None, simple_type={type(''):0, type(1):0, type(1.0):0}.has_key, ): "Render a tree as a table" have_arg=args.has_key exp=0 if level >= 0: urlattr=args['url'] if urlattr and hasattr(self, urlattr): tpUr...
661a564634752c25571a54a50081da0f06ca33ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/661a564634752c25571a54a50081da0f06ca33ce/TreeTag.py
if level > 2: output('<TD COLSPAN="%s"></TD>' % level) elif level > 0: output('<TD></TD>' * level) output('<TD WIDTH="16"></TD>\n')
if level > 2: output(_td_colspan % level) elif level > 0: output(_td_single * level) output(_td_single) output('\n')
def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data, colspan, section, md, treeData, level=0, args=None, simple_type={type(''):0, type(1):0, type(1.0):0}.has_key, ): "Render a tree as a table" have_arg=args.has_key exp=0 if level >= 0: urlattr=args['url'] if urlattr and hasattr(self, urlattr): tpUr...
661a564634752c25571a54a50081da0f06ca33ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/661a564634752c25571a54a50081da0f06ca33ce/TreeTag.py
if level > 3: h='<TD COLSPAN="%s"></TD>' % (level-1) elif level > 1: h='<TD></TD>' * (level-1)
if level > 3: h=_td_colspan % (level-1) elif level > 1: h=_td_single * (level-1)
def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data, colspan, section, md, treeData, level=0, args=None, simple_type={type(''):0, type(1):0, type(1.0):0}.has_key, ): "Render a tree as a table" have_arg=args.has_key exp=0 if level >= 0: urlattr=args['url'] if urlattr and hasattr(self, urlattr): tpUr...
661a564634752c25571a54a50081da0f06ca33ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/661a564634752c25571a54a50081da0f06ca33ce/TreeTag.py
'<TR>%s<TD WIDTH="16"></TD>'
'<TR>%s<TD WIDTH="16" NOWRAP></TD>'
def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data, colspan, section, md, treeData, level=0, args=None, simple_type={type(''):0, type(1):0, type(1.0):0}.has_key, ): "Render a tree as a table" have_arg=args.has_key exp=0 if level >= 0: urlattr=args['url'] if urlattr and hasattr(self, urlattr): tpUr...
661a564634752c25571a54a50081da0f06ca33ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/661a564634752c25571a54a50081da0f06ca33ce/TreeTag.py
'<TR>%s<TD WIDTH="16"></TD>'
'<TR>%s<TD WIDTH="16" NOWRAP></TD>'
def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data, colspan, section, md, treeData, level=0, args=None, simple_type={type(''):0, type(1):0, type(1.0):0}.has_key, ): "Render a tree as a table" have_arg=args.has_key exp=0 if level >= 0: urlattr=args['url'] if urlattr and hasattr(self, urlattr): tpUr...
661a564634752c25571a54a50081da0f06ca33ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/661a564634752c25571a54a50081da0f06ca33ce/TreeTag.py
'<TR>%s<TD WIDTH="16"></TD>'
'<TR>%s<TD WIDTH="16" NOWRAP></TD>'
def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data, colspan, section, md, treeData, level=0, args=None, simple_type={type(''):0, type(1):0, type(1.0):0}.has_key, ): "Render a tree as a table" have_arg=args.has_key exp=0 if level >= 0: urlattr=args['url'] if urlattr and hasattr(self, urlattr): tpUr...
661a564634752c25571a54a50081da0f06ca33ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/661a564634752c25571a54a50081da0f06ca33ce/TreeTag.py
'<TR>%s<TD WIDTH="16"></TD>'
'<TR>%s<TD WIDTH="16" NOWRAP></TD>'
def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data, colspan, section, md, treeData, level=0, args=None, simple_type={type(''):0, type(1):0, type(1.0):0}.has_key, ): "Render a tree as a table" have_arg=args.has_key exp=0 if level >= 0: urlattr=args['url'] if urlattr and hasattr(self, urlattr): tpUr...
661a564634752c25571a54a50081da0f06ca33ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/661a564634752c25571a54a50081da0f06ca33ce/TreeTag.py
__implements__ = IZCatalog
def manage_addZCatalog(self, id, title, vocab_id=None, # Deprecated REQUEST=None): """Add a ZCatalog object """ id=str(id) title=str(title) c=ZCatalog(id, title, vocab_id, self) self._setObject(id, c) if REQUEST is not None: return self.manage_main(self, REQUEST,update_menu=1)
ee4a2a75639e19d6338268d60bdb049d1cbc8a53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ee4a2a75639e19d6338268d60bdb049d1cbc8a53/ZCatalog.py
def manage_addZCatalog(self, id, title, vocab_id=None, # Deprecated REQUEST=None): """Add a ZCatalog object """ id=str(id) title=str(title) c=ZCatalog(id, title, vocab_id, self) self._setObject(id, c) if REQUEST is not None: return self.manage_main(self, REQUEST,update_menu=1)
ee4a2a75639e19d6338268d60bdb049d1cbc8a53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ee4a2a75639e19d6338268d60bdb049d1cbc8a53/ZCatalog.py
lower=string.lower,
def zpublisher_exception_hook( published, REQUEST, t, v, traceback, # static StringType=type(''), lower=string.lower, ConflictError=ZODB.POSException.ConflictError, ListType=type([]), ): try: if ((type(t) is StringType and lower(t) in ('unauthorized', 'redirect')) or t is SystemExit): raise if issubclass(t, ConflictErr...
d6db71a7bf50eaa36514146e0b589d740ddc111c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d6db71a7bf50eaa36514146e0b589d740ddc111c/__init__.py
if ((type(t) is StringType and lower(t) in ('unauthorized', 'redirect')) or t is SystemExit): raise if issubclass(t, ConflictError): global conflict_errors conflict_errors = conflict_errors + 1 method_name = REQUEST.get('PATH_INFO', '') err = ('ZODB conflict error at %s (%s conflicts since startup ' 'at %s)') LOG(...
if isinstance(t, StringType): if t.lower() in ('unauthorized', 'redirect'): raise else: if t is SystemExit: raise if issubclass(t, ConflictError): global conflict_errors conflict_errors = conflict_errors + 1 method_name = REQUEST.get('PATH_INFO', '') err = ('ZODB conflict error at %s ' '(%s conflicts since startup ...
def zpublisher_exception_hook( published, REQUEST, t, v, traceback, # static StringType=type(''), lower=string.lower, ConflictError=ZODB.POSException.ConflictError, ListType=type([]), ): try: if ((type(t) is StringType and lower(t) in ('unauthorized', 'redirect')) or t is SystemExit): raise if issubclass(t, ConflictErr...
d6db71a7bf50eaa36514146e0b589d740ddc111c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d6db71a7bf50eaa36514146e0b589d740ddc111c/__init__.py
install_products()
def open_bobobase(): # Open the application database Bobobase=Globals.Bobobase=Globals.PickleDictionary(Globals.BobobaseName) product_dir=os.path.join(SOFTWARE_HOME,'Products') sys.path.append(product_dir) try: app=Bobobase['Application'] except KeyError: app=Application() app._init() Bobobase['Application']=app get_...
9e77c365e68ef6099ea6639f42ba0bc0164d55fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e77c365e68ef6099ea6639f42ba0bc0164d55fc/Application.py
for product_name in os.listdir(product_dir):
product_names=os.listdir(product_dir) product_names.sort() for product_name in product_names:
def install_products(): # Install a list of products into the basic folder class, so # that all folders know about top-level objects, aka products path_join=os.path.join product_dir=path_join(SOFTWARE_HOME,'Products') isdir=os.path.isdir exists=os.path.exists app =Globals.Bobobase['Application'] meta_types=list...
9e77c365e68ef6099ea6639f42ba0bc0164d55fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9e77c365e68ef6099ea6639f42ba0bc0164d55fc/Application.py
if no_table: tr='<p>' else: tr, _tr = '<tr>', '</p>' row=('%s\n%s\t\t%s' %
if no_table: tr='<p>', '</p>' else: tr, _tr = '<tr>', '</tr>' row=('%s\n%s\t%s' %
def custom_default_report(id, result, action='', no_table=0): columns=result._searchable_result_columns() __traceback_info__=columns heading=('<tr>\n%s\t</tr>' % string.joinfields( map(lambda c: '\t<th>%s</th>\n' % nicify(c['name']), columns), '' ) ) if no_table: tr, _tr, td, _td, delim = '<p>', '</p>', '', '', ', ' e...
2ca25c9e8b16c221fd1ba4c7fc7eadbfda226c28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2ca25c9e8b16c221fd1ba4c7fc7eadbfda226c28/Aqueduct.py
'\t\t%s<!--
'\t%s<!--
def custom_default_report(id, result, action='', no_table=0): columns=result._searchable_result_columns() __traceback_info__=columns heading=('<tr>\n%s\t</tr>' % string.joinfields( map(lambda c: '\t<th>%s</th>\n' % nicify(c['name']), columns), '' ) ) if no_table: tr, _tr, td, _td, delim = '<p>', '</p>', '', '', ', ' e...
2ca25c9e8b16c221fd1ba4c7fc7eadbfda226c28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2ca25c9e8b16c221fd1ba4c7fc7eadbfda226c28/Aqueduct.py
for k, intset in sort_index.items():
for k, intset in sort_index._index.items():
def _indexedSearch(self, args, sort_index, append, used):
98455762edc9f80cbaa5a2c2c4ce339625846281 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/98455762edc9f80cbaa5a2c2c4ce339625846281/Catalog.py