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

How To Call A Compiled Function Body?

When I get hold of a code object (via internals like .func_code or __code__ in Python 3), is there … Read more How To Call A Compiled Function Body?

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

Looping Over A Python / Ironpython Object Methods

What is the proper way to loop over a Python object's methods and call them? Given the object: … Read more Looping Over A Python / Ironpython Object Methods

Python Inspect.stack Is Slow

I was just profiling my Python program to see why it seemed to be rather slow. I discovered that th… Read more Python Inspect.stack Is Slow

Sqlalchemy Introspect Column Type With Inheritance

Considering this code (and using SQLAlchemy 0.7.7): class Document(Base): __tablename__ = '… Read more Sqlalchemy Introspect Column Type With Inheritance