| | |
- __builtin__.dict(__builtin__.object)
-
- frozendict
- __builtin__.object
-
- Edge(__builtin__.object, Common)
- Graph(__builtin__.object, Common)
-
- Cluster
- Dot
- Subgraph
- Node(__builtin__.object, Common)
- exceptions.Exception(exceptions.BaseException)
-
- Error
- InvocationException
- Common
-
- Edge(__builtin__.object, Common)
- Graph(__builtin__.object, Common)
-
- Cluster
- Dot
- Subgraph
- Node(__builtin__.object, Common)
class Cluster(Graph) |
| |
Class representing a cluster in Graphviz's dot language.
This class implements the methods to work on a representation
of a cluster in Graphviz's dot language.
cluster(graph_name='subG', suppress_disconnected=False, attribute=value, ...)
graph_name:
the cluster's name (the string 'cluster' will be always prepended)
suppress_disconnected:
defaults to false, which will remove from the
cluster any disconnected nodes.
All the attributes defined in the Graphviz dot language should
be supported.
Attributes can be set through the dynamically generated methods:
set_[attribute name], i.e. set_color, set_fontname
or using the instance's attributes:
Cluster.[attribute name], i.e.
cluster_instance.color, cluster_instance.fontname |
| |
- Method resolution order:
- Cluster
- Graph
- __builtin__.object
- Common
Methods defined here:
- __init__(self, graph_name='subG', obj_dict=None, suppress_disconnected=False, simplify=False, **attrs)
Methods inherited from Graph:
- add_edge(self, graph_edge)
- Adds an edge object to the graph.
It takes a edge object as its only argument and returns
None.
- add_node(self, graph_node)
- Adds a node object to the graph.
It takes a node object as its only argument and returns
None.
- add_subgraph(self, sgraph)
- Adds an subgraph object to the graph.
It takes a subgraph object as its only argument and returns
None.
- get_edge(self, src, dst)
- Retrieved an edge from the graph.
Given an edge's source and destination the corresponding
Edge instance will be returned.
If multiple edges exist with that source and destination,
a list of Edge instances is returned.
If only one edge exists, the instance is returned.
None is returned otherwise.
- get_edge_defaults(self, **attrs)
- get_edge_list(self)
- Get the list of Edge instances.
This method returns the list of Edge instances
composing the graph.
- get_edges(self)
- get_graph_defaults(self, **attrs)
- get_graph_type(self)
- get_name(self)
- Get the graph's name.
- get_next_sequence_number(self)
- get_node(self, name)
- Retrieved a node from the graph.
Given a node's name the corresponding Node
instance will be returned.
If multiple nodes exist with that name, a list of
Node instances is returned.
If only one node exists, the instance is returned.
None is returned otherwise.
- get_node_defaults(self, **attrs)
- get_node_list(self)
- Get the list of Node instances.
This method returns the list of Node instances
composing the graph.
- get_nodes(self)
- Return an iterator.
- get_simplify(self)
- Get whether to simplify or not.
Refer to set_simplify for more information.
- get_strict(self, val)
- Get graph's 'strict' mode (True, False).
This option is only valid for top level graphs.
- get_subgraph(self, name)
- Retrieved a subgraph from the graph.
Given a subgraph's name the corresponding
Subgraph instance will be returned.
If multiple subgraphs exist with the same name, a list of
Subgraph instances is returned.
If only one Subgraph exists, the instance is returned.
None is returned otherwise.
- get_subgraph_list(self)
- Get the list of Subgraph instances.
This method returns the list of Subgraph instances
in the graph.
- get_subgraphs(self)
- get_suppress_disconnected(self, val)
- Get if suppress disconnected is set.
Refer to set_suppress_disconnected for more information.
- get_top_graph_type(self)
- get_type(self)
- Get the graph's type, 'graph' or 'digraph'.
- set_edge_defaults(self, **attrs)
- set_graph_defaults(self, **attrs)
- set_name(self, graph_name)
- Set the graph's name.
- set_node_defaults(self, **attrs)
- set_parent_graph(self, parent_graph)
- set_simplify(self, simplify)
- Set whether to simplify or not.
If True it will avoid displaying equal edges, i.e.
only one edge between two nodes. removing the
duplicated ones.
- set_strict(self, val)
- Set graph to 'strict' mode.
This option is only valid for top level graphs.
- set_suppress_disconnected(self, val)
- Suppress disconnected nodes in the output graph.
This option will skip nodes in the graph with no incoming or outgoing
edges. This option works also for subgraphs and has effect only in the
current graph/subgraph.
- set_type(self, graph_type)
- Set the graph's type, 'graph' or 'digraph'.
- to_string(self)
- Returns a string representation of the graph in dot language.
It will return the graph and all its subelements in string from.
Data descriptors inherited from Graph:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from Common:
- __get_attribute__(self, attr)
- Look for default attributes for this node
- __getstate__(self)
- __setstate__(self, state)
- create_attribute_methods(self, obj_attributes)
- get(self, name)
- Get an attribute value by name.
Given an attribute 'name' it will get its value.
There's always the possibility of using the methods:
get_'name'()
which are defined for all the existing attributes.
- get_attributes(self)
- get_parent_graph(self)
- get_sequence(self)
- set(self, name, value)
- Set an attribute value by name.
Given an attribute 'name' it will set its value to 'value'.
There's always the possibility of using the methods:
set_'name'(value)
which are defined for all the existing attributes.
- set_sequence(self, seq)
|
class Common |
| |
Common information to several classes.
Should not be directly used, several classes are derived from
this one. |
| |
Methods defined here:
- __get_attribute__(self, attr)
- Look for default attributes for this node
- __getstate__(self)
- __setstate__(self, state)
- create_attribute_methods(self, obj_attributes)
- get(self, name)
- Get an attribute value by name.
Given an attribute 'name' it will get its value.
There's always the possibility of using the methods:
get_'name'()
which are defined for all the existing attributes.
- get_attributes(self)
- get_parent_graph(self)
- get_sequence(self)
- set(self, name, value)
- Set an attribute value by name.
Given an attribute 'name' it will set its value to 'value'.
There's always the possibility of using the methods:
set_'name'(value)
which are defined for all the existing attributes.
- set_parent_graph(self, parent_graph)
- set_sequence(self, seq)
|
class Dot(Graph) |
| |
A container for handling a dot language file.
This class implements methods to write and process
a dot language file. It is a derived class of
the base class 'Graph'. |
| |
- Method resolution order:
- Dot
- Graph
- __builtin__.object
- Common
Methods defined here:
- __getstate__(self)
- __init__(self, *argsl, **argsd)
- create(self, prog=None, format='ps')
- Creates and returns a Postscript representation of the graph.
create will write the graph to a temporary dot file and process
it with the program given by 'prog' (which defaults to 'twopi'),
reading the Postscript output and returning it as a string is the
operation is successful.
On failure None is returned.
There's also the preferred possibility of using:
create_'format'(prog='program')
which are automatically defined for all the supported formats.
[create_ps(), create_gif(), create_dia(), ...]
- set_graphviz_executables(self, paths)
- This method allows to manually specify the location of the GraphViz executables.
The argument to this method should be a dictionary where the keys are as follows:
{'dot': '', 'twopi': '', 'neato': '', 'circo': '', 'fdp': ''}
and the values are the paths to the corresponding executable, including the name
of the executable itself.
- set_prog(self, prog)
- Sets the default program.
Sets the default program in charge of processing
the dot file into a graph.
- set_shape_files(self, file_paths)
- Add the paths of the required image files.
If the graph needs graphic objects to be used as shapes or otherwise
those need to be in the same folder as the graph is going to be rendered
from. Alternatively the absolute path to the files can be specified when
including the graphics in the graph.
The files in the location pointed to by the path(s) specified as arguments
to this method will be copied to the same temporary location where the
graph is going to be rendered.
- write(self, path, prog=None, format='raw')
- Writes a graph to a file.
Given a filename 'path' it will open/create and truncate
such file and write on it a representation of the graph
defined by the dot object and in the format specified by
'format'.
The format 'raw' is used to dump the string representation
of the Dot object, without further processing.
The output can be processed by any of graphviz tools, defined
in 'prog', which defaults to 'dot'
Returns True or False according to the success of the write
operation.
There's also the preferred possibility of using:
write_'format'(path, prog='program')
which are automatically defined for all the supported formats.
[write_ps(), write_gif(), write_dia(), ...]
Methods inherited from Graph:
- add_edge(self, graph_edge)
- Adds an edge object to the graph.
It takes a edge object as its only argument and returns
None.
- add_node(self, graph_node)
- Adds a node object to the graph.
It takes a node object as its only argument and returns
None.
- add_subgraph(self, sgraph)
- Adds an subgraph object to the graph.
It takes a subgraph object as its only argument and returns
None.
- get_edge(self, src, dst)
- Retrieved an edge from the graph.
Given an edge's source and destination the corresponding
Edge instance will be returned.
If multiple edges exist with that source and destination,
a list of Edge instances is returned.
If only one edge exists, the instance is returned.
None is returned otherwise.
- get_edge_defaults(self, **attrs)
- get_edge_list(self)
- Get the list of Edge instances.
This method returns the list of Edge instances
composing the graph.
- get_edges(self)
- get_graph_defaults(self, **attrs)
- get_graph_type(self)
- get_name(self)
- Get the graph's name.
- get_next_sequence_number(self)
- get_node(self, name)
- Retrieved a node from the graph.
Given a node's name the corresponding Node
instance will be returned.
If multiple nodes exist with that name, a list of
Node instances is returned.
If only one node exists, the instance is returned.
None is returned otherwise.
- get_node_defaults(self, **attrs)
- get_node_list(self)
- Get the list of Node instances.
This method returns the list of Node instances
composing the graph.
- get_nodes(self)
- Return an iterator.
- get_simplify(self)
- Get whether to simplify or not.
Refer to set_simplify for more information.
- get_strict(self, val)
- Get graph's 'strict' mode (True, False).
This option is only valid for top level graphs.
- get_subgraph(self, name)
- Retrieved a subgraph from the graph.
Given a subgraph's name the corresponding
Subgraph instance will be returned.
If multiple subgraphs exist with the same name, a list of
Subgraph instances is returned.
If only one Subgraph exists, the instance is returned.
None is returned otherwise.
- get_subgraph_list(self)
- Get the list of Subgraph instances.
This method returns the list of Subgraph instances
in the graph.
- get_subgraphs(self)
- get_suppress_disconnected(self, val)
- Get if suppress disconnected is set.
Refer to set_suppress_disconnected for more information.
- get_top_graph_type(self)
- get_type(self)
- Get the graph's type, 'graph' or 'digraph'.
- set_edge_defaults(self, **attrs)
- set_graph_defaults(self, **attrs)
- set_name(self, graph_name)
- Set the graph's name.
- set_node_defaults(self, **attrs)
- set_parent_graph(self, parent_graph)
- set_simplify(self, simplify)
- Set whether to simplify or not.
If True it will avoid displaying equal edges, i.e.
only one edge between two nodes. removing the
duplicated ones.
- set_strict(self, val)
- Set graph to 'strict' mode.
This option is only valid for top level graphs.
- set_suppress_disconnected(self, val)
- Suppress disconnected nodes in the output graph.
This option will skip nodes in the graph with no incoming or outgoing
edges. This option works also for subgraphs and has effect only in the
current graph/subgraph.
- set_type(self, graph_type)
- Set the graph's type, 'graph' or 'digraph'.
- to_string(self)
- Returns a string representation of the graph in dot language.
It will return the graph and all its subelements in string from.
Data descriptors inherited from Graph:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from Common:
- __get_attribute__(self, attr)
- Look for default attributes for this node
- __setstate__(self, state)
- create_attribute_methods(self, obj_attributes)
- get(self, name)
- Get an attribute value by name.
Given an attribute 'name' it will get its value.
There's always the possibility of using the methods:
get_'name'()
which are defined for all the existing attributes.
- get_attributes(self)
- get_parent_graph(self)
- get_sequence(self)
- set(self, name, value)
- Set an attribute value by name.
Given an attribute 'name' it will set its value to 'value'.
There's always the possibility of using the methods:
set_'name'(value)
which are defined for all the existing attributes.
- set_sequence(self, seq)
|
class Edge(__builtin__.object, Common) |
| |
A graph edge.
This class represents a graph's edge with all its attributes.
edge(src, dst, attribute=value, ...)
src: source node's name
dst: destination node's name
All the attributes defined in the Graphviz dot language should
be supported.
Attributes can be set through the dynamically generated methods:
set_[attribute name], i.e. set_label, set_fontname
or using the instance's attributes:
Edge.[attribute name], i.e. edge_instance.label, edge_instance.fontname |
| |
- Method resolution order:
- Edge
- __builtin__.object
- Common
Methods defined here:
- __eq__(self, edge)
- Compare two edges.
If the parent graph is directed, arcs linking
node A to B are considered equal and A->B != B->A
If the parent graph is undirected, any edge
connecting two nodes is equal to any other
edge connecting the same nodes, A->B == B->A
- __init__(self, src='', dst='', obj_dict=None, **attrs)
- get_destination(self)
- Get the edge's destination node name.
- get_source(self)
- Get the edges source node name.
- parse_node_ref(self, node_str)
- to_string(self)
- Returns a string representation of the edge in dot language.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from Common:
- __get_attribute__(self, attr)
- Look for default attributes for this node
- __getstate__(self)
- __setstate__(self, state)
- create_attribute_methods(self, obj_attributes)
- get(self, name)
- Get an attribute value by name.
Given an attribute 'name' it will get its value.
There's always the possibility of using the methods:
get_'name'()
which are defined for all the existing attributes.
- get_attributes(self)
- get_parent_graph(self)
- get_sequence(self)
- set(self, name, value)
- Set an attribute value by name.
Given an attribute 'name' it will set its value to 'value'.
There's always the possibility of using the methods:
set_'name'(value)
which are defined for all the existing attributes.
- set_parent_graph(self, parent_graph)
- set_sequence(self, seq)
|
class Graph(__builtin__.object, Common) |
| |
Class representing a graph in Graphviz's dot language.
This class implements the methods to work on a representation
of a graph in Graphviz's dot language.
graph( graph_name='G', graph_type='digraph',
strict=False, suppress_disconnected=False, attribute=value, ...)
graph_name:
the graph's name
graph_type:
can be 'graph' or 'digraph'
suppress_disconnected:
defaults to False, which will remove from the
graph any disconnected nodes.
simplify:
if True it will avoid displaying equal edges, i.e.
only one edge between two nodes. removing the
duplicated ones.
All the attributes defined in the Graphviz dot language should
be supported.
Attributes can be set through the dynamically generated methods:
set_[attribute name], i.e. set_size, set_fontname
or using the instance's attributes:
Graph.[attribute name], i.e. graph_instance.label, graph_instance.fontname |
| |
- Method resolution order:
- Graph
- __builtin__.object
- Common
Methods defined here:
- __init__(self, graph_name='G', obj_dict=None, graph_type='digraph', strict=False, suppress_disconnected=False, simplify=False, **attrs)
- add_edge(self, graph_edge)
- Adds an edge object to the graph.
It takes a edge object as its only argument and returns
None.
- add_node(self, graph_node)
- Adds a node object to the graph.
It takes a node object as its only argument and returns
None.
- add_subgraph(self, sgraph)
- Adds an subgraph object to the graph.
It takes a subgraph object as its only argument and returns
None.
- get_edge(self, src, dst)
- Retrieved an edge from the graph.
Given an edge's source and destination the corresponding
Edge instance will be returned.
If multiple edges exist with that source and destination,
a list of Edge instances is returned.
If only one edge exists, the instance is returned.
None is returned otherwise.
- get_edge_defaults(self, **attrs)
- get_edge_list(self)
- Get the list of Edge instances.
This method returns the list of Edge instances
composing the graph.
- get_edges(self)
- get_graph_defaults(self, **attrs)
- get_graph_type(self)
- get_name(self)
- Get the graph's name.
- get_next_sequence_number(self)
- get_node(self, name)
- Retrieved a node from the graph.
Given a node's name the corresponding Node
instance will be returned.
If multiple nodes exist with that name, a list of
Node instances is returned.
If only one node exists, the instance is returned.
None is returned otherwise.
- get_node_defaults(self, **attrs)
- get_node_list(self)
- Get the list of Node instances.
This method returns the list of Node instances
composing the graph.
- get_nodes(self)
- Return an iterator.
- get_simplify(self)
- Get whether to simplify or not.
Refer to set_simplify for more information.
- get_strict(self, val)
- Get graph's 'strict' mode (True, False).
This option is only valid for top level graphs.
- get_subgraph(self, name)
- Retrieved a subgraph from the graph.
Given a subgraph's name the corresponding
Subgraph instance will be returned.
If multiple subgraphs exist with the same name, a list of
Subgraph instances is returned.
If only one Subgraph exists, the instance is returned.
None is returned otherwise.
- get_subgraph_list(self)
- Get the list of Subgraph instances.
This method returns the list of Subgraph instances
in the graph.
- get_subgraphs(self)
- get_suppress_disconnected(self, val)
- Get if suppress disconnected is set.
Refer to set_suppress_disconnected for more information.
- get_top_graph_type(self)
- get_type(self)
- Get the graph's type, 'graph' or 'digraph'.
- set_edge_defaults(self, **attrs)
- set_graph_defaults(self, **attrs)
- set_name(self, graph_name)
- Set the graph's name.
- set_node_defaults(self, **attrs)
- set_parent_graph(self, parent_graph)
- set_simplify(self, simplify)
- Set whether to simplify or not.
If True it will avoid displaying equal edges, i.e.
only one edge between two nodes. removing the
duplicated ones.
- set_strict(self, val)
- Set graph to 'strict' mode.
This option is only valid for top level graphs.
- set_suppress_disconnected(self, val)
- Suppress disconnected nodes in the output graph.
This option will skip nodes in the graph with no incoming or outgoing
edges. This option works also for subgraphs and has effect only in the
current graph/subgraph.
- set_type(self, graph_type)
- Set the graph's type, 'graph' or 'digraph'.
- to_string(self)
- Returns a string representation of the graph in dot language.
It will return the graph and all its subelements in string from.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from Common:
- __get_attribute__(self, attr)
- Look for default attributes for this node
- __getstate__(self)
- __setstate__(self, state)
- create_attribute_methods(self, obj_attributes)
- get(self, name)
- Get an attribute value by name.
Given an attribute 'name' it will get its value.
There's always the possibility of using the methods:
get_'name'()
which are defined for all the existing attributes.
- get_attributes(self)
- get_parent_graph(self)
- get_sequence(self)
- set(self, name, value)
- Set an attribute value by name.
Given an attribute 'name' it will set its value to 'value'.
There's always the possibility of using the methods:
set_'name'(value)
which are defined for all the existing attributes.
- set_sequence(self, seq)
|
class Node(__builtin__.object, Common) |
| |
A graph node.
This class represents a graph's node with all its attributes.
node(name, attribute=value, ...)
name: node's name
All the attributes defined in the Graphviz dot language should
be supported. |
| |
- Method resolution order:
- Node
- __builtin__.object
- Common
Methods defined here:
- __init__(self, name='', obj_dict=None, **attrs)
- add_style(self, style)
- get_name(self)
- Get the node's name.
- get_port(self)
- Get the node's port.
- set_name(self, node_name)
- Set the node's name.
- to_string(self)
- Returns a string representation of the node in dot language.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from Common:
- __get_attribute__(self, attr)
- Look for default attributes for this node
- __getstate__(self)
- __setstate__(self, state)
- create_attribute_methods(self, obj_attributes)
- get(self, name)
- Get an attribute value by name.
Given an attribute 'name' it will get its value.
There's always the possibility of using the methods:
get_'name'()
which are defined for all the existing attributes.
- get_attributes(self)
- get_parent_graph(self)
- get_sequence(self)
- set(self, name, value)
- Set an attribute value by name.
Given an attribute 'name' it will set its value to 'value'.
There's always the possibility of using the methods:
set_'name'(value)
which are defined for all the existing attributes.
- set_parent_graph(self, parent_graph)
- set_sequence(self, seq)
|
class Subgraph(Graph) |
| |
Class representing a subgraph in Graphviz's dot language.
This class implements the methods to work on a representation
of a subgraph in Graphviz's dot language.
subgraph(graph_name='subG', suppress_disconnected=False, attribute=value, ...)
graph_name:
the subgraph's name
suppress_disconnected:
defaults to false, which will remove from the
subgraph any disconnected nodes.
All the attributes defined in the Graphviz dot language should
be supported.
Attributes can be set through the dynamically generated methods:
set_[attribute name], i.e. set_size, set_fontname
or using the instance's attributes:
Subgraph.[attribute name], i.e.
subgraph_instance.label, subgraph_instance.fontname |
| |
- Method resolution order:
- Subgraph
- Graph
- __builtin__.object
- Common
Methods defined here:
- __init__(self, graph_name='', obj_dict=None, suppress_disconnected=False, simplify=False, **attrs)
- # RMF: subgraph should have all the attributes of graph so it can be passed
# as a graph to all methods
Methods inherited from Graph:
- add_edge(self, graph_edge)
- Adds an edge object to the graph.
It takes a edge object as its only argument and returns
None.
- add_node(self, graph_node)
- Adds a node object to the graph.
It takes a node object as its only argument and returns
None.
- add_subgraph(self, sgraph)
- Adds an subgraph object to the graph.
It takes a subgraph object as its only argument and returns
None.
- get_edge(self, src, dst)
- Retrieved an edge from the graph.
Given an edge's source and destination the corresponding
Edge instance will be returned.
If multiple edges exist with that source and destination,
a list of Edge instances is returned.
If only one edge exists, the instance is returned.
None is returned otherwise.
- get_edge_defaults(self, **attrs)
- get_edge_list(self)
- Get the list of Edge instances.
This method returns the list of Edge instances
composing the graph.
- get_edges(self)
- get_graph_defaults(self, **attrs)
- get_graph_type(self)
- get_name(self)
- Get the graph's name.
- get_next_sequence_number(self)
- get_node(self, name)
- Retrieved a node from the graph.
Given a node's name the corresponding Node
instance will be returned.
If multiple nodes exist with that name, a list of
Node instances is returned.
If only one node exists, the instance is returned.
None is returned otherwise.
- get_node_defaults(self, **attrs)
- get_node_list(self)
- Get the list of Node instances.
This method returns the list of Node instances
composing the graph.
- get_nodes(self)
- Return an iterator.
- get_simplify(self)
- Get whether to simplify or not.
Refer to set_simplify for more information.
- get_strict(self, val)
- Get graph's 'strict' mode (True, False).
This option is only valid for top level graphs.
- get_subgraph(self, name)
- Retrieved a subgraph from the graph.
Given a subgraph's name the corresponding
Subgraph instance will be returned.
If multiple subgraphs exist with the same name, a list of
Subgraph instances is returned.
If only one Subgraph exists, the instance is returned.
None is returned otherwise.
- get_subgraph_list(self)
- Get the list of Subgraph instances.
This method returns the list of Subgraph instances
in the graph.
- get_subgraphs(self)
- get_suppress_disconnected(self, val)
- Get if suppress disconnected is set.
Refer to set_suppress_disconnected for more information.
- get_top_graph_type(self)
- get_type(self)
- Get the graph's type, 'graph' or 'digraph'.
- set_edge_defaults(self, **attrs)
- set_graph_defaults(self, **attrs)
- set_name(self, graph_name)
- Set the graph's name.
- set_node_defaults(self, **attrs)
- set_parent_graph(self, parent_graph)
- set_simplify(self, simplify)
- Set whether to simplify or not.
If True it will avoid displaying equal edges, i.e.
only one edge between two nodes. removing the
duplicated ones.
- set_strict(self, val)
- Set graph to 'strict' mode.
This option is only valid for top level graphs.
- set_suppress_disconnected(self, val)
- Suppress disconnected nodes in the output graph.
This option will skip nodes in the graph with no incoming or outgoing
edges. This option works also for subgraphs and has effect only in the
current graph/subgraph.
- set_type(self, graph_type)
- Set the graph's type, 'graph' or 'digraph'.
- to_string(self)
- Returns a string representation of the graph in dot language.
It will return the graph and all its subelements in string from.
Data descriptors inherited from Graph:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from Common:
- __get_attribute__(self, attr)
- Look for default attributes for this node
- __getstate__(self)
- __setstate__(self, state)
- create_attribute_methods(self, obj_attributes)
- get(self, name)
- Get an attribute value by name.
Given an attribute 'name' it will get its value.
There's always the possibility of using the methods:
get_'name'()
which are defined for all the existing attributes.
- get_attributes(self)
- get_parent_graph(self)
- get_sequence(self)
- set(self, name, value)
- Set an attribute value by name.
Given an attribute 'name' it will set its value to 'value'.
There's always the possibility of using the methods:
set_'name'(value)
which are defined for all the existing attributes.
- set_sequence(self, seq)
|
class frozendict(__builtin__.dict) |
| |
# Extented version of ASPN's Python Cookbook Recipe:
# Frozen dictionaries.
# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/414283
#
# This version freezes dictionaries used as values within dictionaries. |
| |
- Method resolution order:
- frozendict
- __builtin__.dict
- __builtin__.object
Methods defined here:
- __hash__(self)
- __init__(self, *args, **kw)
- __repr__(self)
Static methods defined here:
- __new__(cls, *args, **kw)
Data descriptors defined here:
- __delitem__
- __dict__
- dictionary for instance variables (if defined)
- __setitem__
- __weakref__
- list of weak references to the object (if defined)
- clear
- pop
- popitem
- setdefault
- update
Methods inherited from __builtin__.dict:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __contains__(...)
- D.__contains__(k) -> True if D has a key k, else False
- __eq__(...)
- x.__eq__(y) <==> x==y
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __gt__(...)
- x.__gt__(y) <==> x>y
- __iter__(...)
- x.__iter__() <==> iter(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __ne__(...)
- x.__ne__(y) <==> x!=y
- copy(...)
- D.copy() -> a shallow copy of D
- get(...)
- D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
- has_key(...)
- D.has_key(k) -> True if D has a key k, else False
- items(...)
- D.items() -> list of D's (key, value) pairs, as 2-tuples
- iteritems(...)
- D.iteritems() -> an iterator over the (key, value) items of D
- iterkeys(...)
- D.iterkeys() -> an iterator over the keys of D
- itervalues(...)
- D.itervalues() -> an iterator over the values of D
- keys(...)
- D.keys() -> list of D's keys
- values(...)
- D.values() -> list of D's values
Data and other attributes inherited from __builtin__.dict:
- fromkeys = <built-in method fromkeys of type object at 0x35ab80>
- dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
v defaults to None.
| |