Load the .env file if necessary.
349733
protected function bootstrapDotenv()
    {
        if (!$this->files->has($this->paths->getDotenvPath())) {
            return;
        }

        $path = $this->files->getAdapter()->applyPathPrefix($this->paths->getBasePath());
        $dotenv = new Dotenv($path);
        $dotenv->load();
    }
1062754
function load(file) {

    let contents = null;

    file = path.resolve(file);

    // handle .env files
    if (constants.REGEX.envfile.test(file)) {
        contents = util.parse(fs.readFileSync(file, 'utf8'));

    // handle .js/.json files
    } else {
        contents = require(file);
    }

    return env(contents);

}
567447
def load(pipfile_path=None, inject_env=True):
    

    if pipfile_path is None:
        pipfile_path = Pipfile.find()

    return Pipfile.load(filename=pipfile_path, inject_env=inject_env)
467288
private function loadEnvironment()
    {
        /**
         * Application Environment
         */
        $required_env = [
            # application configuration
            'APP_NAME', 'APP_ENV', 'APP_KEY',

            # database configuration
            'DB_HOSTNAME', 'DB_PORT', 'DB_USERNAME', 'DB_PASSWORD', 'DB_NAME',

            # application mode
            'APP_MODE'
        ];

        $root = $_SERVER['PWD'];

        $dotenv = new Dotenv($root);
        $dotenv->overload();
        $dotenv->required($required_env);
    }
1371747
def loads(content):
    """"""
    lines = _group_lines(line for line in content.split('\n'))
    lines = [
        (i, _parse_envfile_line(line))
        for i, line in lines if line.strip()
    ]
    errors = []
    # Reject files with duplicate variables (no sane default).
    duplicates = _find_duplicates(((i, line[0]) for i, line in lines))
    for i, variable, j in duplicates:
        errors.append(''.join([
                'Line %d: duplicate environment variable "%s": ',
                'already appears on line %d.',
            ]) % (i + 1, variable, j + 1)
        )
    # Done!
    if errors:
        raise ValueError(errors)
    return {k: v for _, (k, v) in lines}
848906
def load_files(files):
    """"""

    for py_file in files:
        LOG.debug("exec %s", py_file)
        execfile(py_file, globals(), locals())
869490
def _load_config_file(self):
        """"""
        with open(self._config_file) as f:
            config = yaml.safe_load(f)
            patch_config(config, self.__environment_configuration)
            return config
1081539
def create_env(env_file):
    """"""

    environ = {}
    with open(env_file, 'r') as f:
        for line in f.readlines():
            line = line.rstrip(os.linesep)
            if '=' not in line:
                continue
            if line.startswith('#'):
                continue
            key, value = line.split('=', 1)
            environ[key] = parse_value(value)
    return environ
249290
def init():
    """"""
    if not os.path.isdir('venv'):
        print(cyan('\nCreating the virtual env...'))

        local('pyvenv-3.4 venv')

        print(green('Virtual env created.'))

    print(green('Virtual Environment ready.'))
162671
public function loadEnv() {
        $ed = $this->loadEnvDefault();
        $ej = $this->loadEnvJson();
        
        if(!$ed && !$ej ) {
            $msg = "No configuration files found.";
            $this->error($msg);
            die($msg);
        }
    }
1069567
def load_env_file():
    
    if not os.path.exists(ENV_FILE):
        return

    for line in open(ENV_FILE, 'r'):
        line = line.strip()
        if not line:
            continue
        name, value = line.split('=', 1)
        if not name or not value or name.startswith('#') or len(name) == 0 or name.isspace():
            continue
        if re.match(r'^(["\']).*\1$', value):
            if value.startswith('"'):
                value = os.path.expandvars(value)
            value = value[1:-1]
        os.environ[name] = value
848541
def get_env(env_file='.env'):
    
    try:
        with open(env_file) as f:
            for line in f.readlines():
                try:
                    key, val = line.split('=', maxsplit=1)
                    os.environ.setdefault(key.strip(), val.strip())
                except ValueError:
                    pass
    except FileNotFoundError:
        pass
655380
def _load(self):
        """"""
        self.wavelength, self.irradiance = \
            np.genfromtxt(self.filename, unpack=True)
424797
def _env(self, line):
        '''
   
        '''
        line = self._setup('ENV', line)

        # Extract environment (list) from the line
        environ = parse_env(line)

        # Add to global environment, run during install
        self.install += environ

        # Also define for global environment
        self.environ += environ
1358528
function _loadEnv(cwd) {
  const envPath = resolve(cwd, '.env');

  if (!process.env.SECRET_KEY && !fs.existsSync(envPath)) {
    Generator.copyEnv(cwd);
  }

  dotenv.config({ path: envPath });
}
1213689
def load_enviroment(file = nil)
        file ||= "."

        if File.directory?(file) && File.exists?(File.expand_path("#{file}/config/environment.rb"))
          require 'rails'
          require File.expand_path("#{file}/config/environment.rb")
          if defined?(::Rails) && ::Rails.respond_to?(:application)
            # Rails 3
            ::Rails.application.eager_load!
          elsif defined?(::Rails::Initializer)
            # Rails 2.3
            $rails_rake_task = false
            ::Rails::Initializer.run :load_application_classes
          end
        elsif File.file?(file)
          require File.expand_path(file)
        end
      end
55799
def init_app(self, app, env_file=None, verbose_mode=False):
        """"""
        if self.app is None:
            self.app = app
        self.verbose_mode = verbose_mode

        if env_file is None:
            env_file = os.path.join(os.getcwd(), ".env")
        if not os.path.exists(env_file):
            warnings.warn("can't read {0} - it doesn't exist".format(env_file))
        else:
            self.__import_vars(env_file)