diff options
Diffstat (limited to 'math/py-gato/files')
-rw-r--r-- | math/py-gato/files/patch-Gato.py | 57 | ||||
-rw-r--r-- | math/py-gato/files/patch-GatoUtil.py | 13 | ||||
-rw-r--r-- | math/py-gato/files/patch-Graph.py | 11 | ||||
-rw-r--r-- | math/py-gato/files/patch-GraphUtil.py | 85 | ||||
-rw-r--r-- | math/py-gato/files/patch-Gred.py | 38 |
5 files changed, 204 insertions, 0 deletions
diff --git a/math/py-gato/files/patch-Gato.py b/math/py-gato/files/patch-Gato.py new file mode 100644 index 000000000000..c9ff38cbbaab --- /dev/null +++ b/math/py-gato/files/patch-Gato.py @@ -0,0 +1,57 @@ +--- Gato.py.orig Wed May 16 13:16:55 2001 ++++ Gato.py Mon Sep 3 12:26:21 2001 +@@ -38,7 +38,6 @@ + import bdb + import whrandom + import re +-import regsub + import string + import StringIO + import tokenize +@@ -49,13 +48,13 @@ + from ScrolledText import ScrolledText + + +-from Graph import Graph +-from GraphUtil import * +-from GraphDisplay import GraphDisplayToplevel +-from GatoUtil import * +-from GatoGlobals import * +-from GatoDialogs import AboutBox, SplashScreen, HTMLViewer +-import GatoIcons ++from Gato.Graph import Graph ++from Gato.GraphUtil import * ++from Gato.GraphDisplay import GraphDisplayToplevel ++from Gato.GatoUtil import * ++from Gato.GatoGlobals import * ++from Gato.GatoDialogs import AboutBox, SplashScreen, HTMLViewer ++from Gato import GatoIcons + + # put someplace else + def WMExtrasGeometry(window): +@@ -67,7 +66,7 @@ + + NOTE: Does not work with tk8.0 style menus, since those are + handled by WM (according to Tk8.1 docs) """ +- g = regsub.split(window.geometry(),"+") ++ g = re.split("\+", window.geometry()) + trueRootx = string.atoi(g[1]) + trueRooty = string.atoi(g[2]) + +@@ -1159,11 +1158,11 @@ + self.algoGlobals['A'] = self.GUI.graphDisplay + # XXX + # explictely loading packages we want to make available to the algorithm +- modules = ['DataStructures', +- 'AnimatedDataStructures', +- 'AnimatedAlgorithms', +- 'GraphUtil', +- 'GatoUtil'] ++ modules = ['Gato.DataStructures', ++ 'Gato.AnimatedDataStructures', ++ 'Gato.AnimatedAlgorithms', ++ 'Gato.GraphUtil', ++ 'Gato.GatoUtil'] + + for m in modules: + exec("from %s import *" % m, self.algoGlobals, self.algoGlobals) diff --git a/math/py-gato/files/patch-GatoUtil.py b/math/py-gato/files/patch-GatoUtil.py new file mode 100644 index 000000000000..7cdcf9b766a1 --- /dev/null +++ b/math/py-gato/files/patch-GatoUtil.py @@ -0,0 +1,13 @@ +--- GatoUtil.py.orig Wed May 16 13:16:56 2001 ++++ GatoUtil.py Mon Sep 3 12:14:42 2001 +@@ -40,8 +40,8 @@ + + def extension(pathAndFile): + """ Return ext if path/filename.ext is given """ +- import regsub +- return regsub.split(stripPath(pathAndFile),"\.")[1] ++ import re ++ return re.split("\.", stripPath(pathAndFile))[1] + + def stripPath(pathAndFile): + """ Return filename.ext if path/filename.ext is given """ diff --git a/math/py-gato/files/patch-Graph.py b/math/py-gato/files/patch-Graph.py new file mode 100644 index 000000000000..6d0e4937efbf --- /dev/null +++ b/math/py-gato/files/patch-Graph.py @@ -0,0 +1,11 @@ +--- Graph.py.orig Wed May 16 13:16:57 2001 ++++ Graph.py Fri Aug 31 17:12:01 2001 +@@ -31,7 +31,7 @@ + # + ################################################################################ + +-from regsub import split ++from re import split + from GatoGlobals import * + from DataStructures import Point2D, VertexLabeling, EdgeLabeling, EdgeWeight + from math import log diff --git a/math/py-gato/files/patch-GraphUtil.py b/math/py-gato/files/patch-GraphUtil.py new file mode 100644 index 000000000000..8c652aaaee22 --- /dev/null +++ b/math/py-gato/files/patch-GraphUtil.py @@ -0,0 +1,85 @@ +--- GraphUtil.py.orig Wed May 16 13:16:58 2001 ++++ GraphUtil.py Mon Sep 3 12:21:49 2001 +@@ -31,7 +31,7 @@ + # + ################################################################################ + +-from regsub import split ++from re import split + from GatoGlobals import * + from Graph import Graph + from DataStructures import Point2D, VertexLabeling, EdgeLabeling, EdgeWeight, VertexWeight, Queue +@@ -223,13 +223,13 @@ + break + + if lineNr == 2: # Read directed and euclidian +- splitLine = split(line[:-1],';') +- G.directed = eval(split(splitLine[0],':')[1]) +- G.simple = eval(split(splitLine[1],':')[1]) +- G.euclidian = eval(split(splitLine[2],':')[1]) +- intWeights = eval(split(splitLine[3],':')[1]) +- nrOfEdgeWeights = eval(split(splitLine[4],':')[1]) +- nrOfVertexWeights = eval(split(splitLine[5],':')[1]) ++ splitLine = split(';',line[:-1]) ++ G.directed = eval(split(':',splitLine[0])[1]) ++ G.simple = eval(split(':',splitLine[1])[1]) ++ G.euclidian = eval(split(':',splitLine[2])[1]) ++ intWeights = eval(split(':',splitLine[3])[1]) ++ nrOfEdgeWeights = eval(split(':',splitLine[4])[1]) ++ nrOfVertexWeights = eval(split(':',splitLine[5])[1]) + for i in xrange(nrOfEdgeWeights): + G.edgeWeights[i] = EdgeWeight(G) + for i in xrange(nrOfVertexWeights): +@@ -237,33 +237,33 @@ + + + if lineNr == 5: # Read nr of vertices +- nrOfVertices = eval(split(line[:-2],':')[1]) # Strip of "\n" and ; ++ nrOfVertices = eval(split(':',line[:-2])[1]) # Strip of "\n" and ; + firstVertexLineNr = lineNr + 1 + lastVertexLineNr = lineNr + nrOfVertices + + if firstVertexLineNr <= lineNr and lineNr <= lastVertexLineNr: +- splitLine = split(line[:-1],';') ++ splitLine = split(';',line[:-1]) + v = G.AddVertex() +- x = eval(split(splitLine[1],':')[1]) +- y = eval(split(splitLine[2],':')[1]) ++ x = eval(split(':',splitLine[1])[1]) ++ y = eval(split(':',splitLine[2])[1]) + for i in xrange(nrOfVertexWeights): +- w = eval(split(splitLine[3+i],':')[1]) ++ w = eval(split(':',splitLine[3+i])[1]) + G.vertexWeights[i][v] = w + + E[v] = Point2D(x,y) + + if lineNr == lastVertexLineNr + 1: # Read Nr of edges +- nrOfEdges = eval(split(line[:-2],':')[1]) # Strip of "\n" and ; ++ nrOfEdges = eval(split(':',line[:-2])[1]) # Strip of "\n" and ; + firstEdgeLineNr = lineNr + 1 + lastEdgeLineNr = lineNr + nrOfEdges + + if firstEdgeLineNr <= lineNr and lineNr <= lastEdgeLineNr: +- splitLine = split(line[:-1],';') +- h = eval(split(splitLine[0],':')[1]) +- t = eval(split(splitLine[1],':')[1]) ++ splitLine = split(';',line[:-1]) ++ h = eval(split(':',splitLine[0])[1]) ++ t = eval(split(':',splitLine[1])[1]) + G.AddEdge(t,h) + for i in xrange(nrOfEdgeWeights): +- G.edgeWeights[i][(t,h)] = eval(split(splitLine[3+i],':')[1]) ++ G.edgeWeights[i][(t,h)] = eval(split(':',splitLine[3+i])[1]) + + lineNr = lineNr + 1 + +@@ -345,7 +345,7 @@ + if not line: + return retval + +- token = filter(lambda x: x != '', split(line[:-1],"[\t ]*")) ++ token = filter(lambda x: x != '', split("[\t ]*",line[:-1])) + + if len(token) == 1 and token[0] == ']': + return retval diff --git a/math/py-gato/files/patch-Gred.py b/math/py-gato/files/patch-Gred.py new file mode 100644 index 000000000000..cc10c754f8cd --- /dev/null +++ b/math/py-gato/files/patch-Gred.py @@ -0,0 +1,38 @@ +--- Gred.py.orig Wed May 16 13:16:58 2001 ++++ Gred.py Mon Sep 3 12:01:13 2001 +@@ -31,16 +31,16 @@ + # last change by $Author: schliep $. + # + ################################################################################ +-from Graph import Graph +-from DataStructures import EdgeWeight, VertexWeight +-from GraphUtil import OpenCATBoxGraph, OpenGMLGraph, SaveCATBoxGraph, WeightedGraphInformer +-from GraphEditor import GraphEditor ++from Gato.Graph import Graph ++from Gato.DataStructures import EdgeWeight, VertexWeight ++from Gato.GraphUtil import OpenCATBoxGraph, OpenGMLGraph, SaveCATBoxGraph, WeightedGraphInformer ++from Gato.GraphEditor import GraphEditor + from Tkinter import * +-from GatoUtil import stripPath, extension, gatoPath +-from GatoGlobals import * +-import GatoDialogs +-import GatoGlobals +-import GatoIcons ++from Gato.GatoUtil import stripPath, extension, gatoPath ++from Gato.GatoGlobals import * ++from Gato import GatoDialogs ++from Gato import GatoGlobals ++from Gato import GatoIcons + from ScrolledText import * + + from tkFileDialog import askopenfilename, asksaveasfilename +@@ -51,7 +51,8 @@ + import sys + import os + +-import GraphCreator, Embedder ++from Gato import GraphCreator ++from Gato import Embedder + + class GredSplashScreen(GatoDialogs.SplashScreen): + |