summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--iw/congrats.py19
-rw-r--r--tree.py16
2 files changed, 35 insertions, 0 deletions
diff --git a/iw/congrats.py b/iw/congrats.py
new file mode 100644
index 000000000..59e92a71d
--- /dev/null
+++ b/iw/congrats.py
@@ -0,0 +1,19 @@
+from gtk import *
+from iw import *
+
+class CongratulationWindow (InstallWindow):
+
+ def __init__ (self, ics):
+ InstallWindow.__init__ (self, ics)
+
+ ics.setTitle ("Congratulations")
+ ics.setPrevEnabled (0)
+ ics.setNextEnabled (1)
+
+ def getScreen (self):
+ label = GtkLabel("install done")
+
+ box = GtkVBox (FALSE, 10)
+ box.pack_start (label, TRUE, TRUE, 0)
+
+ return box
diff --git a/tree.py b/tree.py
new file mode 100644
index 000000000..84dd53084
--- /dev/null
+++ b/tree.py
@@ -0,0 +1,16 @@
+def build_tree (x):
+ if (x == ()): return ()
+ if (len (x) == 1): return (x[0],)
+ else: return (x[0], build_tree (x[1:]))
+
+def merge (a, b):
+ if a == (): return build_tree (b)
+ if b == (): return a
+ if b[0] == a[0]:
+ if len (a) > 1 and isinstance (a[1], type (())):
+ return (a[0],) + (merge (a[1], b[1:]),) + a[2:]
+ elif b[1:] == (): return a
+ else: return (a[0],) + (build_tree (b[1:]),) + a[1:]
+ else:
+ return (a[0],) + merge (a[1:], b)
+