Display tab

The Display tab displays a pretty print view of an object. PyCrust has a built-in function, pp(), that uses Python's pretty print module (pprint) to produce a nicely formatted view of any wxPython object. However, instead of requiring you to explicitly import and use pprint repeatedly, the information in the Display tab is updated every time the displayed object is updated.

For example, to see how the contents of a list change as you manipulate it in the shell, you can make the Display tab the current tab, use the pp() function within the shell to display your list object, then run the code that modifies your list. Whenever the list changes, the changes are immediately visible in the Display tab.

Was this article helpful?

0 0

Post a comment