示例#1
0
def test_search_module_noname():
    pi.search(pi)
示例#2
0
def test_examples():
    pi.search(ex)  # runs all of them
示例#3
0
def test_search_class_args():
    pi.search(Console, "search", print_table=False)
    pi.search(Console, "search", print_table=True)

    pi.search(Console, "search", include_parents=False)
    pi.search(Console, "search", include_parents=True)
示例#4
0
def test_search_module():
    pi.search(pi, "search")
示例#5
0
def test_search_class():
    pi.search(Console, "export")
示例#6
0
def test_search_class_noname():
    pi.search(Console)
示例#7
0
def test_search_module_args():
    pi.search(pi, "search", print_table=False)
    pi.search(pi, "search", print_table=True)

    pi.search(pi, "search", include_class=False)
    pi.search(pi, "search", include_class=True)
示例#8
0
"""
    This tutorial shows how to use pyinspect.search
    to find a class' methods given a search string
"""

# import the class you need to inspect
from rich.console import Console

# import pyinspect
import pyinspect as pi

# find class methods
pi.search(Console, "export")  # use include_parents=False to skip parents
示例#9
0
"""
    This tutorial shows how to use pyinspect.search
    to find a module's function given a search string.
"""

# import the module whose functions you're looking for
import matplotlib.pyplot as plt

# import matplotlib

# import pyinspect
import pyinspect as pi

# Find the functions you're looking for
pi.search(plt, name="subplot")

# Or look for it in the entire package!
# pi.search(matplotlib, name="subplot")


"""
    Pro tip: omit the 'name' argument to find *all* functions

    Pro tip: pass 'include_class=False' to pi.search to ignore classes and
        only look for functions
"""
示例#10
0
# import pyinspect
import pyinspect as pi

# Find the functions you're looking for
pi.search(pi, name="what")
示例#11
0
import pyinspect as pi

pi.search(pi, "search")

pi.showme(pi.find.search)