(self, key)
return self._codepage.unicode_to_bytes(getenvu(ukey, u''))
Get environment (bytes) value or b''.
Get environment (bytes) value or b''.
Get environment ( bytes ) value or b .
def _getenv(self, key):
        """Get environment (bytes) value or b''."""
        assert isinstance(key, bytes), type(key)
        # only accept ascii-128 for keys
        try:
            ukey = key.decode('ascii')
        except UnicodeError:
            raise error.BASICError(error.IFC)
        # enforce uppercase
        ukey = ukey.upper()
        return self._codepage.unicode_to_bytes(getenvu(ukey, u''))
def _getenv ( self , key ) : assert isinstance ( key , bytes ) , type ( key ) # only accept ascii-128 for keys try : ukey = key . decode ( 'ascii' ) except UnicodeError : raise error . BASICError ( error . IFC ) # enforce uppercase ukey = ukey . upper ( ) return self . _codepage . unicode_to_bytes ( getenvu ( ukey , u'' ) )