'Tries to get most appropriate environent, on windows
it\'s os.environ.copy, but on other system\'s we\'ll
try get values from login shell'

def getenv(self, settings):

    getenv_command = settings.get(u'getenv_command')
    if (getenv_command and POSIX):
        try:
            output = subprocess.check_output(getenv_command)
            lines = output.decode(u'utf-8', errors=u'replace').splitlines()
            env = dict((line.split(u'=', 1) for line in lines))
            return env
        except:
            import traceback
            traceback.print_exc()
            error_message(u"SublimeREPL:    obtaining    sane    environment    failed    in    getenv()\nCheck    console    and    'getenv_command'    setting    \nWARN:    Falling    back    to    SublimeText    environment")
    return os.environ.copy()
