473,405 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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

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):
...

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

Before I reinvent the wheel and start writing one myself, can somebody
point me to a ready made one? I am afraid Googling "Python Graph"
wouldn't be much help (millions and trillions of hits).

Thanks,

Nov 20 '06 #1
4 1603

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

Nov 20 '06 #2
Learn something new everyday.

Okay, when I run a test program:

import Graph

graph = Graph("1")
I got:

Traceback (most recent call last):
File "E:\test\Graph\test_graph.py", line 3, in ?
graph = Graph("1")
TypeError: 'module' object is not callable
Oh, wait....silly me. Should have been:

from Graph import Graph

<bonk, bonk, bonk>

Must be a Sunday.

Thanks,

E:\test\Graph>

John Machin wrote:
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
Nov 20 '06 #3
John, networkx at networkx.lanl.gov
John Henry wrote:
I am looking for a ready made simple graph package.
Nov 20 '06 #4
Thanks, downloading now.

bo****@comcast.net wrote:
John, networkx at networkx.lanl.gov
John Henry wrote:
I am looking for a ready made simple graph package.
Nov 21 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ramon F Herrera | last post by:
Hello: Is there some C hash package out there? I am a big fan of the Berkeley DB, which has outstanding performance, but it is (I think) restricted to disk operations, while I would like to...
2
by: Wayne Wengert | last post by:
I have some Windows applications developed using VS2005/VB to which I want to add a licensing system. I am looking for a system that can provide the following capabilities: - Allow users to...
15
by: GS | last post by:
Hello, I am looking for any opensource package for "appointment system" for doctors, please let me know. This is just o take Name/Phone/time, incase if there is not any opensource, then is it...
2
by: raknin | last post by:
Hi, I am looking for a close package of secure login and registeration written in PHP.The package that I am looking for should have the following functionality I believe this is standard...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.