aboutsummaryrefslogtreecommitdiffstats
path: root/kadoscope.py
diff options
context:
space:
mode:
Diffstat (limited to 'kadoscope.py')
-rw-r--r--kadoscope.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/kadoscope.py b/kadoscope.py
new file mode 100644
index 0000000..d4d605f
--- /dev/null
+++ b/kadoscope.py
@@ -0,0 +1,10 @@
+import random
+import sqlite3
+brothers = ["Guillaume", "Geoffroy", "Thibaut", "Bertrand", "Enguerrand"]
+random.shuffle(brothers)
+conn = sqlite3.connect('famille.db')
+c = conn.cursor()
+for i in range(5):
+ c.execute('UPDATE users SET kado=? WHERE user_name=?', (brothers[i], brothers[(i+1)%5]))
+conn.commit()
+conn.close()