[Checkins] SVN: grokcore.startup/branches/ipython-debug-shell/src/grokcore/startup/debug.py expose the api to getUtility, and getMultiAdapter
Christian Klinger
cvs-admin at zope.org
Mon Apr 30 08:07:14 UTC 2012
Log message for revision 125423:
expose the api to getUtility, and getMultiAdapter
Changed:
U grokcore.startup/branches/ipython-debug-shell/src/grokcore/startup/debug.py
-=-
Modified: grokcore.startup/branches/ipython-debug-shell/src/grokcore/startup/debug.py
===================================================================
--- grokcore.startup/branches/ipython-debug-shell/src/grokcore/startup/debug.py 2012-04-29 17:26:10 UTC (rev 125422)
+++ grokcore.startup/branches/ipython-debug-shell/src/grokcore/startup/debug.py 2012-04-30 08:07:10 UTC (rev 125423)
@@ -20,6 +20,7 @@
import zope.app.debug
from pprint import pprint
from zope.securitypolicy.zopepolicy import settingsForObject
+from zope.component import getUtility, getMultiAdapter
from IPython.frontend.terminal.embed import InteractiveShellEmbed
shell = InteractiveShellEmbed()
@@ -60,9 +61,11 @@
root=self.root,
ctx=self.ctx,
sec=self.get_security_settings,
+ gu=getUtility,
+ gma=getMultiAdapter,
sync=self.sync,
pby=self.providedBy,
- commit=self.commit)
+ commit=transaction.commit)
def update_ns(self):
shell.user_ns.update(self.ns())
@@ -74,9 +77,6 @@
def sync(self):
self.root._p_jar.sync()
- def commit(self):
- transaction.commit()
-
def ls(self, path=None):
"""List objects.
@@ -152,7 +152,7 @@
def providedBy(self, obj=None):
if not obj:
obj = self.ctx
- return list(zope.interface.providedBy(obj))
+ return list(zope.interface.providedBy(obj))
def get_context_by_path(context, path):
for name in (p for p in path.split(PATH_SEP) if p):
@@ -195,6 +195,8 @@
cdg / ;cdg
lsg / ;lsg
sec / ;sec
+ gu / ;gu
+ gma / ;gma
pby (providedBy)
pwdg
sync
More information about the checkins
mailing list