O'Reilly logo

Python Programming On Win32 by Mark Hammond, Andy Robinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Object Browser

PythonWin supports a fairly simple object browser. This allows you to peer deep inside any Python object, allowing you to discover various details about the object.

In contrast with the Python path browser, the object browser doesn’t browse Python source code: only Python objects. This means that objects you wish to browse must actually exist in the Python environment. For example, the only way to browse a Python module in this browser is to import the module.

The object browser can be found by selecting Tools Browser or by pressing Ctrl-B. A dialog is presented asking for the object to browse; to browse the sample Python module, enter pywindemo and select OK.

If you expand the hello() function in the browser, you should have a window similar to that shown in Figure 4.2.

The PythonWin browser
Figure 4.2. The PythonWin browser

Because the browser digs deeply into Python’s internals, some of the information presented is quite esoteric. However, it can often provide useful information about your objects.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required