Not sure this little example is what you look for:
with open(xP.prefsJSONfile) as data_file:
xP.prefs = json.load(data_file)
xP.prefs['keyname'] = somedata
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.
---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/bottle.py", line 862, in _handle return route.call(**args) File "/usr/lib/python3/dist-packages/bottle.py", line 1740, in wrapper rv = callback(*a, **ka) File "Bottle.py", line 17, in ajax json_data = request.json["h1_value"] + "and Welcome to Bottle" TypeError: 'NoneType' object is not subscriptable
Please if you can help me Because I wasn't able to resolve this problem since 1 week and it begin to make me crasy.
Thanks for your help
--