IPython Documentation

Table Of Contents

Previous topic

utils.warn

Next topic

About IPython

This Page

utils.wildcard

Module: utils.wildcard

Support for wildcard pattern matching in object inspection.

Authors

Functions

IPython.utils.wildcard.create_typestr2type_dicts(dont_include_in_type2typestr=['lambda'])

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

IPython.utils.wildcard.dict_dir(obj)

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.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.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.

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

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