This documentation covers IPython versions 6.0 and higher. Beginning with version 6.0, IPython stopped supporting compatibility with Python versions lower than 3.3 including all versions of Python 2.7.

If you are looking for an IPython version compatible with Python 2.7, please use the IPython 5.x LTS release and refer to its documentation (LTS is the long term support release).

Module: utils.wildcard

Support for wildcard pattern matching in object inspection.


6 Functions


Return dictionaries mapping lower case typename (e.g. ‘tuple’) to type objects from the types package, and vice versa.

IPython.utils.wildcard.is_type(obj, typestr_or_type)

is_type(obj, typestr_or_type) verifies if obj is of a certain type. It can take strings or actual python types for the second argument, i.e. ‘tuple’<->TupleType. ‘all’ matches all types.

TODO: Should be extended for choosing more than one type.

IPython.utils.wildcard.show_hidden(str, show_all=False)

Return true for strings starting with single _ if show_all is true.


Produce a dictionary of an object’s attributes. Builds on dir2 by checking that a getattr() call actually succeeds.

IPython.utils.wildcard.filter_ns(ns, name_pattern='*', type_pattern='all', ignore_case=True, show_all=True)

Filter a namespace dictionary by name pattern and item type.

IPython.utils.wildcard.list_namespace(namespace, type_pattern, filter, ignore_case=False, show_all=False)

Return dictionary of all objects in a namespace dictionary that match type_pattern and filter.