Looking for a graph (as in network, nodes) package

John Machin sjmachin at lexicon.net
Sun Nov 19 20:33:45 EST 2006


John Henry wrote:
> I am looking for a ready made simple graph package.  I found an
> extensive one in the piana package but when  I try to use just the
> graph portion, it fails to load because of the line:
>
> class Graph(object):

"fails to load" is insufficient information. Please provide the
traceback and the actual error message.

What version of Python are you using? That line should be OK from
Python 2.2 onwards.

>  ...
>
> It seems that their Graph is subclassed from "object" but I couldn't
> find a "object" class anywhere.  So, I abandoned using that one.
>

object is built-in to Python. It is the uber-class from which new-style
classes inherit.
New-style classes were introduced in Python 2.2

class Foo(object): # new-style class

class Bar: # old-style class




More information about the Python-list mailing list