Created
December 10, 2014 17:22
-
-
Save bennuttall/e73c5ed731f83f9e3d07 to your computer and use it in GitHub Desktop.
astro.py
This file contains hidden or 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
from space import Mission | |
from time import sleep | |
with Mission() as mission: | |
mission.launch() | |
while mission.explore(): | |
mission.discover() | |
mission.learn() | |
mission.phone_home() | |
try: | |
mission.open_pod_bay_doors() | |
except: | |
print("I'm sorry Dave, I'm afraid I can't do that") | |
finally: | |
sleep(8 * 60 * 60) |
This file contains hidden or 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
class Mission: | |
def __init__(self): | |
pass | |
def __enter__(self): | |
return self | |
def __exit__(self, a, b, c): | |
pass | |
def explore(self): | |
pass | |
def launch(self): | |
pass | |
def discover(self): | |
pass | |
def learn(self): | |
pass | |
def phone_home(self): | |
pass | |
def open_pod_bay_doors(self): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
astro.py
is the code used in the background in the Astro Pi logo (click for large version):space.py
is just a minimal implementation to make sure theastro.py
code is valid.