starter code for this demo.

master
Michael Kennedy 8 years ago
parent a2b4ed1855
commit 2bdbf9ef19

4
.gitignore vendored

@ -102,3 +102,7 @@ src/07_mongoengine/service_central_starter/.idea/misc.xml
src/07_mongoengine/service_central_starter/.idea/modules.xml src/07_mongoengine/service_central_starter/.idea/modules.xml
src/07_mongoengine/service_central_starter/.idea/service_central_starter.iml src/07_mongoengine/service_central_starter/.idea/service_central_starter.iml
src/07_mongoengine/service_central_starter/.idea/inspectionProfiles/profiles_settings.xml src/07_mongoengine/service_central_starter/.idea/inspectionProfiles/profiles_settings.xml
src/07_mongoengine/service_central/.idea/misc.xml
src/07_mongoengine/service_central/.idea/modules.xml
src/07_mongoengine/service_central/.idea/service_central.iml
src/07_mongoengine/service_central/.idea/inspectionProfiles/profiles_settings.xml

@ -0,0 +1,56 @@
def main():
print_header()
user_loop()
def print_header():
print('----------------------------------------------')
print('| |')
print('| SERVICE CENTRAL v.02 |')
print('| demo edition |')
print('| |')
print('----------------------------------------------')
print()
def user_loop():
while True:
print("Available actions:")
print(" * [a]dd car")
print(" * [l]ist cars")
print(" * [f]ind car")
print(" * perform [s]ervice")
print(" * e[x]it")
print()
ch = input("> ").strip().lower()
if ch == 'a':
add_car()
elif ch == 'l':
list_cars()
elif ch == 'f':
find_car()
elif ch == 's':
service_car()
elif not ch or ch == 'x':
print("Goodbye")
break
def add_car():
print("TODO: add_car")
def list_cars():
print("TODO: list_cars")
def find_car():
print("TODO: find_car")
def service_car():
print("TODO: service_car")
if __name__ == '__main__':
main()
Loading…
Cancel
Save