Skip to content

Instantly share code, notes, and snippets.

@bennuttall
Created December 10, 2014 17:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bennuttall/e73c5ed731f83f9e3d07 to your computer and use it in GitHub Desktop.
Save bennuttall/e73c5ed731f83f9e3d07 to your computer and use it in GitHub Desktop.
astro.py
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)
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
@bennuttall
Copy link
Author

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 the astro.py code is valid.

@M1ke
Copy link

M1ke commented Dec 11, 2014

Spaaaaaaaaace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment