29 lines
595 B
Python
29 lines
595 B
Python
# Bryan Schumaker (11/06/2010)
|
|
|
|
from libsaria import trees
|
|
|
|
#tree = trees.Tree()
|
|
#tree.insert(["home", "bjschuma", "Music"])
|
|
#tree.insert(["home", "bjschuma", "Videos"])
|
|
#tree.insert(["home", "other", "Music"])
|
|
|
|
#from libsaria import path
|
|
#tree = path.make_tree("/home/bjschuma/Music")
|
|
#print tree
|
|
|
|
#print tree.value
|
|
#tree.disp()
|
|
#for path in tree.walk():
|
|
# print path
|
|
|
|
|
|
tree = trees.DLTree()
|
|
|
|
n = tree.insert(["a", "b", "c", "d"])
|
|
o = tree.insert(["a", "b", "c", "e"])
|
|
p = tree.insert(["f", "g", "h", "i"])
|
|
tree.disp()
|
|
print n.walk_backwards()
|
|
print o.walk_backwards()
|
|
print p.walk_backwards()
|