(envstr)
return (key, val)
Split env=var into key and val
Split env=var into key and val
Split env = var into key and val
def get_pair(envstr):
    """Split env=var into key and val"""
    if not (is_genstr(envstr) and envstr):
        return ("", "")
    if '=' in envstr:
        try:
            (key, val) = envstr.split('=', 1)
        except (ValueError, NameError, AttributeError):
            return ("", "")
        key = key.strip()
        val = val.strip()
        #for quote in ("'", '"'):
        #    if quote == val[0]:
        #        val = val.strip(quote)
        #        break
    else:
        key = envstr.strip()
        val = os.getenv(envstr, "")
    if not key or ' ' in key or key[0] in string.digits:
        return ("", "")
    return (key, val)
def get_pair ( envstr ) : if not ( is_genstr ( envstr ) and envstr ) : return ( "" , "" ) if '=' in envstr : try : ( key , val ) = envstr . split ( '=' , 1 ) except ( ValueError , NameError , AttributeError ) : return ( "" , "" ) key = key . strip ( ) val = val . strip ( ) #for quote in ("'", '"'): #    if quote == val[0]: #        val = val.strip(quote) #        break else : key = envstr . strip ( ) val = os . getenv ( envstr , "" ) if not key or ' ' in key or key [ 0 ] in string . digits : return ( "" , "" ) return ( key , val )