From 7e3c3f7a19e132e0cf513295de25914bcc156629 Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Mon, 12 Nov 2012 18:55:30 -0500 Subject: Add function to draw kadoscope --- kadoscope.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 kadoscope.py (limited to 'kadoscope.py') 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() -- cgit v1.2.3-70-g09d2