Last active
August 29, 2019 13:20
-
-
Save mdecourse/d9d4fe5b22d0af855603a683c153236e to your computer and use it in GitHub Desktop.
brython example1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("Hello, World!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment