python - How can I view the contents of an array within controller directly for debugging? -
I'm just starting with pylons, and am trying to figure out how to define the variable for debugging Content can be seen without rendering.
For example:
Class Controller Controller (Base Controller): Def Index (Self): # Return a Render Template # Return Render ('/ index.mako') Return a render return render ('/ index.mako') Def test (self): v = request.params return v
I would like to see the contents of the array v, but < / P>
You can use to debug web applications, this variable Files including content The Trit can produce traceback. Here's a description of how to use it.
If you can see server stdout, you can only type in print
variable or in a file: open ("my-debug-log.txt" , "W"). Type (repr (variable))
. In this case, complex data structures (nested arrays, complex disciplines, etc.) can help to simplify.
Comments
Post a Comment