starter code for doc design and mongoengine.

master
Michael Kennedy 8 years ago
parent 338935da43
commit a2b4ed1855

9
.gitignore vendored

@ -93,3 +93,12 @@ src/play_around_pymongo/.idea/modules.xml
src/play_around_pymongo/.idea/play_around_pymongo.iml
src/play_around_pymongo/.idea/dictionaries/screencaster.xml
src/play_around_pymongo/.idea/inspectionProfiles/profiles_settings.xml
src/05_pymongo/play_around_pymongo/.idea/misc.xml
src/05_pymongo/play_around_pymongo/.idea/modules.xml
src/05_pymongo/play_around_pymongo/.idea/play_around_pymongo.iml
src/05_pymongo/play_around_pymongo/.idea/dictionaries/screencaster.xml
src/05_pymongo/play_around_pymongo/.idea/inspectionProfiles/profiles_settings.xml
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/service_central_starter.iml
src/07_mongoengine/service_central_starter/.idea/inspectionProfiles/profiles_settings.xml

@ -0,0 +1,7 @@
<component name="ProjectDictionaryState">
<dictionary name="screencaster">
<words>
<w>ervice</w>
</words>
</dictionary>
</component>

@ -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