(self, key, value)
Set environment (bytes) key to (bytes) value.
Set environment (bytes) key to (bytes) value.
Set environment ( bytes ) key to ( bytes ) value .
def _setenv(self, key, value):
        """Set environment (bytes) key to (bytes) value."""
        assert isinstance(key, bytes), type(key)
        assert isinstance(value, bytes), type(value)
        # only accept ascii-128 for keys
        try:
            ukey = key.decode('ascii')
        except UnicodeError:
            raise error.BASICError(error.IFC)
        # enforce uppercase
        ukey = ukey.upper()
        uvalue = self._codepage.bytes_to_unicode(value)
        setenvu(ukey, uvalue)
def _setenv ( self , key , value ) : assert isinstance ( key , bytes ) , type ( key ) assert isinstance ( value , bytes ) , type ( value ) # only accept ascii-128 for keys try : ukey = key . decode ( 'ascii' ) except UnicodeError : raise error . BASICError ( error . IFC ) # enforce uppercase ukey = ukey . upper ( ) uvalue = self . _codepage . bytes_to_unicode ( value ) setenvu ( ukey , uvalue )