summaryrefslogtreecommitdiff
path: root/helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'helper.py')
-rw-r--r--helper.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/helper.py b/helper.py
index e0d6aad..ec7950b 100644
--- a/helper.py
+++ b/helper.py
@@ -7,3 +7,7 @@ def appdir (*args):
def url (path):
return "\"%s\"" % web.url(path)
+
+def toJS (ls):
+ ls = ("'%s':'%s'" % x for x in ls)
+ return "{ %s }" % ", ".join(ls)