Skip to content

Instantly share code, notes, and snippets.

@JamesHovious
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JamesHovious/a142df372ef32150ad4f to your computer and use it in GitHub Desktop.
Save JamesHovious/a142df372ef32150ad4f to your computer and use it in GitHub Desktop.
Brython REST API Tutorial
# Copy just lines 7 and 8 into the Brython online editor to try it out.
# Copy all of this code into a browser to try it on your own machine
<script src="{{ STATIC_URL }}js/brython/brython.js" type="text/javascript"></script>
<body onload="brython()">
<script type="text/python">
from browser import document
document['main'] <= "Hello world !"
</script>
<div id="main"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment