def test_get(self): Inputs = 'a', 1 RIH.values(*Inputs) # test the call assert(get('str') == Inputs[0]) assert(get('int', type=int) == Inputs[1])
def main(): # from: http://stackoverflow.com/questions/12966147/how-can-i-install-python-modules-programmatically-through-a-python-script if not get(desc="Running this task might reinstall existing packages. Do you want to continue (y/n)?", type=yn): return import pip pip_args = ["install", "-r", "build_requirements.txt"] proxy = os.environ.get("http_proxy") if proxy: pip_args = ["--proxy", proxy] + pip_args if pip.main(pip_args): raise Exception("Failed to install %s" % requirement)
from ec.utils import get from ec.types.basics import yn print get('Say something', yn)
def get(): """Get user input through utils.get. """ print get(desc='Email id', type=regex.email)
def _get(self, route, Config): self._set(route, get( **Config)) # Get the input from the user and write it to the DB.