using grok properly

Asked by ok2

how to debug python code in grok? and how to access data from container?

Question information

Language:
English Edit question
Status:
Answered
For:
grok Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Michael Haubenwallner (d2m) said :
#1

how to debug python code in grok?
------------------------------------------------

there is a debugger instance already setup for your in you project bin folder:

$ bin/project_name-debug
Welcome to the interactive debug prompt.
The 'root' variable contains the ZODB root folder.
The 'app' variable contains the Debugger, 'app.publish(path)' simulates a request.
>>>
...

For more info on how the debugger works look at
http://svn.zope.org/*checkout*/Zope3/trunk/doc/DEBUG.txt

how to access data from container?
------------------------------------------------

a container in grok is much like a dictionary, see
http://grok.zope.org/doc/current/reference/components.html#grok-container

Revision history for this message
Jan-Jaap Driessen (janjaapdriessen) said :
#2

In more recent versions of grok, use

$ bin/interactive_debugger

Can you help with this problem?

Provide an answer of your own, or ask ok2 for more information if necessary.

To post a message you must log in.