[Zope] Is there a way to look at the "raw" data making up an object in the ZODB?

Andy McKay andy at clearwind.ca
Fri Apr 9 14:56:57 EDT 2004


John Ziniti wrote:
> Is there a way to look at what an object looks like in the ZODB
> and find out what attributes it has, without knowing the name
> of this now-defunct attribute?

Open up zope from the command prompt and look at the object and use dir 
to introspect it:

$ /var/zope/bin/zopectl debug
Starting debugger (the name "app" is bound to the top-level Zope object)
 >>> app.objectIds()
['acl_users', 'Control_Panel', 'temp_folder', 'browser_id_manager', 
'session_data_manager', 'error_log', 'index_html', 
'standard_error_message', 'standard_html_footer', 
'standard_html_header', 'standard_template.pt', 'Plone', 'alter', 
'ZChecker']
 >>> dir(app.Plone)
['COPY', 'COPY__roles__', 'DELETE', 'DELETE__roles__', 'HEAD', 
'HEAD__roles__', 'LOCK', 'LOCK__roles__', 'MKCOL', 'MOVE', 
'MOVE__roles__', 'OPTIONS', 'OPTIONS__roles__', 'PROPFIND', 
'PROPFIND__roles__', 'PROPPATCH', 'PROPPATCH__roles__', 'PUT', 
'REQUEST', 'TRACE', 'TRACE__roles__', 'UNLOCK', 'UNLOCK__roles__', 
'__ac_permissions__', '__allow_access_to_unprotected_subobjects__', 
'__basicnew__',

-- 
   Andy McKay
   ClearWind Consulting
   http://www.clearwind.ca



More information about the Zope mailing list