diff util.py @ 46:03358c113170

Better preferences handling: the GUI's responsibility is to convert the input from the event into a boolean value
author Dirk Olmes <dirk@xanthippe.ping.de>
date Sun, 16 May 2010 07:54:24 +0200
parents 12ed8b5fa08c
children 254d5b89a6ca
line wrap: on
line diff
--- a/util.py	Fri May 14 15:24:51 2010 +0200
+++ b/util.py	Sun May 16 07:54:24 2010 +0200
@@ -28,3 +28,9 @@
 
 def str2bool(string):
     return string.lower() in ["yes", "true", "t", "1"]
+
+def bool2str(bool):
+    if bool:
+        return "True"
+    else:
+        return "False"