Exemple #1
0
  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])
Exemple #2
0
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)
Exemple #3
0
from ec.utils import get
from ec.types.basics import yn

print get('Say something', yn)
Exemple #4
0
 def get():
   """Get user input through utils.get.
   """
   print get(desc='Email id', type=regex.email)
Exemple #5
0
 def _get(self, route, Config):
     self._set(route, get(
         **Config))  # Get the input from the user and write it to the DB.