environment/lib/python2.7/site-packages/IPython/utils/wildcard.py
def filter_ns(ns, name_pattern="*", type_pattern="all", ignore_case=True,
            show_all=True):
    """Filter a namespace dictionary by name pattern and item type."""
    pattern = name_pattern.replace("*",".*").replace("?",".")
    if ignore_case:
        reg = re.compile(pattern+"$", re.I)
    else:
        reg = re.compile(pattern+"$")

    # Check each one matches regex; shouldn't be hidden; of correct type.
    return dict((key,obj) for key, obj in ns.iteritems() if reg.match(key) \
                                            and show_hidden(key, show_all) \
                                            and is_type(obj, type_pattern) )
def filter_ns(ns, name_pattern="*", type_pattern="all", ignore_case=True,
            show_all=True):
    pattern = name_pattern.replace("*",".*").replace("?",".")
    if ignore_case:
        reg = re.compile(pattern+"$", re.I)
    else:
        reg = re.compile(pattern+"$")

    # Check each one matches regex; shouldn't be hidden; of correct type.
    return dict((key,obj) for key, obj in ns.iteritems() if reg.match(key) \
                                            and show_hidden(key, show_all) \
                                            and is_type(obj, type_pattern) )
def filter_ns ( ns , name_pattern = "*" , type_pattern = "all" , ignore_case = True , show_all = True ) : pattern = name_pattern . replace ( "*" , ".*" ) . replace ( "?" , "." ) if ignore_case : reg = re . compile ( pattern + "$" , re . I ) else : reg = re . compile ( pattern + "$" ) # Check each one matches regex; shouldn't be hidden; of correct type. return dict ( ( key , obj ) for key , obj in ns . iteritems ( ) if reg . match ( key ) and show_hidden ( key , show_all ) and is_type ( obj , type_pattern ) )
Filter a namespace dictionary by name pattern and item type.
Filter a namespace dictionary by name pattern and item type .