Skip to content

Instantly share code, notes, and snippets.

@mdecourse
Last active August 29, 2019 13:20
Show Gist options
  • Save mdecourse/d9d4fe5b22d0af855603a683c153236e to your computer and use it in GitHub Desktop.
Save mdecourse/d9d4fe5b22d0af855603a683c153236e to your computer and use it in GitHub Desktop.
brython example1
import json
def get_gist(gisturl, filename):
url = 'https://api.github.com/gists/' + gisturl
# info is string
info = open(url).read()
gist = json.loads(info)
return gist["files"][filename]["content"]
print(get_gist("d9d4fe5b22d0af855603a683c153236e", "get_gist_file.py"))
print("Hello, World!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment