ISCE_INSAR/examples/applications/greeter2/greetings/greetings.py

26 lines
513 B
Python
Raw Normal View History

2019-01-16 19:40:08 +00:00
from __future__ import print_function
def english_standard():
from .EnglishStandard import EnglishStandard
return EnglishStandard()
def english_cowboy():
from .EnglishCowboy import EnglishCowboy
return EnglishCowboy()
def spanish():
from .Spanish import Spanish
return Spanish()
facts={'english':english_standard,
'cowboy':english_cowboy,
'spanish':spanish
}
def language(lang):
try:
return facts[lang.lower()]()
except:
return ValueError