def splitext(p):
    i = p.rfind('.')
    if i<=p.rfind('/'):
        return p, ''
    else:
        return p[:i], p[i:]


# Split a pathname into a drive specification and the rest of the
# path.  Useful on DOS/Windows/NT; on Unix, the drive is always empty.
Split the extension from a pathname.  Extension is everything from the
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/posixpath.py/splitext