(self, path)
return self._devices[dev + b':'], spec
Return the disk device and remaining path for given file spec.
Return the disk device and remaining path for given file spec.
Return the disk device and remaining path for given file spec .
def _get_diskdevice_and_path(self, path):
        """Return the disk device and remaining path for given file spec."""
        # careful - do not convert path to uppercase, we still need to match
        splits = bytes(path).split(b':', 1)
        if len(splits) == 0:
            dev, spec = self._current_device, b''
        elif len(splits) == 1:
            dev, spec = self._current_device, splits[0]
        else:
            try:
                dev, spec = splits[0].upper(), splits[1]
            except KeyError:
                raise error.BASICError(error.DEVICE_UNAVAILABLE)
        # must be a disk device
        if dev not in DRIVE_LETTERS:
            raise error.BASICError(error.DEVICE_UNAVAILABLE)
        return self._devices[dev + b':'], spec
def _get_diskdevice_and_path ( self , path ) : # careful - do not convert path to uppercase, we still need to match splits = bytes ( path ) . split ( b':' , 1 ) if len ( splits ) == 0 : dev , spec = self . _current_device , b'' elif len ( splits ) == 1 : dev , spec = self . _current_device , splits [ 0 ] else : try : dev , spec = splits [ 0 ] . upper ( ) , splits [ 1 ] except KeyError : raise error . BASICError ( error . DEVICE_UNAVAILABLE ) # must be a disk device if dev not in DRIVE_LETTERS : raise error . BASICError ( error . DEVICE_UNAVAILABLE ) return self . _devices [ dev + b':' ] , spec