def _normalise_drive_string(drive):
    """Normalise drive string to a single letter."""
    if not drive:
        raise ValueError("invalid drive letter: %r" % (drive,))
    if len(drive) > 3:
        raise ValueError("invalid drive letter: %r" % (drive,))
    if not drive[0].isalpha():
        raise ValueError("invalid drive letter: %r" % (drive,))
    if not ":\\".startswith(drive[1:]):
        raise ValueError("invalid drive letter: %r" % (drive,))
    return drive[0].upper()