def __install_eggs(self, config):
        eggs = []
        if config.has('egg'):
            eggs += [config.get('egg')]
        if config.has('eggs'):
            eggs += [egg.strip() for egg in re.split(',(?!<)|\n', config.get('eggs'))]
        self.logger.debug("Installing eggs %s..." % eggs)
        with open(os.path.join(self.directory.install_directory(self.feature_name), 'requirements.txt'),
                  'w+') as fh:
            fh.write('\n'.join(eggs))
        stdout = subprocess.PIPE if config.is_affirmative('redirect_stdout_to_log', 'true') else None
        return_code, output = lib.call("PYTHONPATH='' bin/pip install -r requirements.txt --upgrade",
                                       cwd=self.directory.install_directory(self.feature_name),
                                       output_log_level=logging.DEBUG,
                                       shell=True,
                                       stdout=stdout)
        if config.is_affirmative('fail_on_error', True) and return_code != 0:
            raise EggscriptFormulaException("Egg script {name} returned a return code of {code}!".format(name=self.feature_name, code=return_code))
Parse a scanned ID code (QR Code)
dataset/ETHPy150Open toumorokoshi/sprinter/sprinter/formula/eggscript.py/EggscriptFormula.__install_eggs--crossover with--dataset/ETHPy150Open sahana/eden/modules/s3db/dvr.py/DVRRegisterCaseEvent.parse_code