def splitdrive(path):
    """Split a pathname into drive and path specifiers. 

    Returns a 2-tuple "(drive,path)"; either part may be empty.
    """
    # Algorithm based on CPython's ntpath.splitdrive and ntpath.isabs.
    if path[1:2] == ':' and path[0].lower() in 'abcdefghijklmnopqrstuvwxyz' \
            and (path[2:] == '' or path[2] in '/\\'):
        return path[:2], path[2:]
    return '', path