Skip to content Skip to sidebar Skip to footer
Showing posts with the label Introspection

Get Package Of Python Object

Given an object or type I can get the object's module using the inspect package Example Here, g… Read more Get Package Of Python Object

Printing Names Of Variables Passed To A Function

In some circumstances, I want to print debug-style output like this: # module test.py def f() a =… Read more Printing Names Of Variables Passed To A Function

Find Module Name Of The Originating Exception In Python

Example: >>> try: ... myapp.foo.doSomething() ... except Exception, e: ... print … Read more Find Module Name Of The Originating Exception In Python

How To Introspectively Connect Handlers To Signals?

gtk.Builder is capable to identify all signals that a GUI (described in a XML file) can emit and wi… Read more How To Introspectively Connect Handlers To Signals?