Module implementing an HTML variant of Tim Peters cyclops.
_quickrepr |
_repr |
clBlue |
clGreen |
clRed |
indent |
CycleFinderHTML | Class for finding cycles in Python data structures. |
_CyclopsHTMLRepr | A class to make short HTML representations of objects. |
find_declarer | Function to find the declarer of an attribute. |
replaceLT | Function to replace less than character by their HTML entity. |
Class for finding cycles in Python data structures.
See Cyclops module description for details.
None |
CycleFinderHTML | Create a cycle finder with empty root set. |
_add_section | Method to add a section to the report. |
_print_cycle | Method to print a cycle. |
_print_separator | Method to add a separator to the report. |
add_stat_line | Method to add a statistics line to the report. |
get_page | Method to retrieve the report. |
iterate_til_steady_state | Method to purge dead root sets until a steady state is reached. |
show_arcs | compare=None -> print unique arc types in cycles. |
show_chased_types | Method to add a list of installed chasers to the report. |
show_cycleobjs | compare=typename_address_cmp -> print all objects in cycles. |
show_cycles | Print all cycles to stdout. |
show_obj | obj -> print short description of obj to sdtout. |
show_sccs | compare=typename_address_cmp -> print SCCs. |
show_stats | Print statistics for the last run of find_cycles. |
stats_list | Method to generate a list of statistics. |
Create a cycle finder with empty root set.
Method to add a section to the report.
Method to print a cycle.
Method to add a separator to the report.
Method to add a statistics line to the report.
Method to retrieve the report.
Method to purge dead root sets until a steady state is reached.
compare=None -> print unique arc types in cycles.
See module docstring for details. Briefly, each arc in a cycle is categorized by the type of the source node, the kind of arc (how we got from the source to the destination), and the type of the destination node. Each line of output consists of those three pieces of info preceded by the count of arcs of that kind. By default, the rows are sorted first by column 2 (source node type), then by columns 3 and 4.
Method to add a list of installed chasers to the report.
compare=typename_address_cmp -> print all objects in cycles.
Prints to stdout. Each distinct object find_cycles found in a cycle is displayed. The set of objects found in cycles is first sorted by the optional "compare" function. By default, objects are sorted using their type name as the primary key and their storage address (id) as the secondary key; among objects of instance type, sorts by the instances' class names; among objects of class type, sorts by the classes' names.
Print all cycles to stdout.
obj -> print short description of obj to sdtout.
This is of the form
where
compare=typename_address_cmp -> print SCCs.
Prints to stdout. Shows the objects in cycles partitioned into strongly connected components (that is, the largest groupings possible such that each object in an SCC is reachable from every other object in that SCC). Within each SCC, objects are sorted as for show_cycleobjs.
Print statistics for the last run of find_cycles.
Method to generate a list of statistics.
A class to make short HTML representations of objects.
The std repr.repr sorts dicts by keys, but we refer to the keys via numeric subscript in cycle reports, so first a derived class that leaves dicts in raw order. Also, instances, instance methods and classes frequently appear in cycle reports, so avoid chopping their reprs at all. We're only trying to prevent massive expense for massive lists, tuples & dicts.
repr_instance_method |
_CyclopsHTMLRepr | Constructor |
repr_class | Method overriding the base class formatter. |
repr_dictionary | Method overriding the base dictionary formatter. |
repr_instance | Method overriding the base instance formatter. |
Constructor
Method overriding the base class formatter.
Method overriding the base dictionary formatter.
Method overriding the base instance formatter.
Function to find the declarer of an attribute.
Function to replace less than character by their HTML entity.