Subversion Repositories programming

Rev

Rev 395 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 395 Rev 397
Line 2... Line 2...
2
 
2
 
3
__author__    = "Ira W. Snyder (devel@irasnyder.com)"
3
__author__    = "Ira W. Snyder (devel@irasnyder.com)"
4
__copyright__ = "Copyright (c) 2006 Ira W. Snyder (devel@irasnyder.com)"
4
__copyright__ = "Copyright (c) 2006 Ira W. Snyder (devel@irasnyder.com)"
5
__license__   = "GNU GPL v2 (or, at your option, any later version)"
5
__license__   = "GNU GPL v2 (or, at your option, any later version)"
6
 
6
 
7
# Fix for the lame version of python on the school's computers (v2.1)
7
from PyCompat import * # fixes for school computers
8
try:
-
 
9
	(True, False)
-
 
10
except NameError:
-
 
11
	(True, False) = (1, 0)
-
 
12
 
8
 
13
class Vertex:
9
class Vertex (object):
14
	def __init__ (self, label='', value=0, shape='circle', raw_obj=None):
10
	def __init__ (self, label='', value=0, shape='circle', raw_obj=None):
15
		self.label = label
11
		self.label = label
16
		self.value = value
12
		self.value = value
17
		self.shape = shape
13
		self.shape = shape
18
		self.raw_obj = raw_obj
14
		self.raw_obj = raw_obj
19
 
15
 
20
class Edge:
16
class Edge (object):
21
	def __init__ (self, color='black', label=''):
17
	def __init__ (self, color='black', label=''):
22
		self.color = color
18
		self.color = color
23
		self.label = label
19
		self.label = label
24
 
20
 
25
class Graph:
21
class Graph: