コード例 #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)