예제 #1
0
def constructGraph(start, end):
    g = Graph(words)
    print("Words : " + start + "---->" + end)
    trace = g.min_trace(start, end)
    print(trace)
예제 #2
0
def constructGraph(start, end):
    g = Graph(words)
    print("Words : " + start + "---->" + end)
    trace = g.min_trace(start, end)
    print(trace)
예제 #3
0
파일: Main.py 프로젝트: ktisha/python2012
__author__ = "vio"
from Word_Graph import Graph
from sys import argv

if __name__ == "__main__":
    if len(argv) != 4:
        print argv
        print "Wrong args"
        exit()
    with open(argv[1]) as file:
        words = [line.rstrip() for line in file]
    g = Graph(words)
    print ("Words : " + argv[2] + "---->" + argv[3])
    trace = g.min_trace(argv[2], argv[3])
    print (trace)
예제 #4
0
__author__ = 'vio'
from Word_Graph import Graph
from sys import argv

if __name__ == "__main__":
    if len(argv) != 4:
        print argv
        print "Wrong args"
        exit()
    with open(argv[1]) as file:
        words = [line.rstrip() for line in file]
    g = Graph(words)
    print("Words : " + argv[2] + "---->" + argv[3])
    trace = g.min_trace(argv[2], argv[3])
    print(trace)