def splitext_plus(f):
    """Split on file extensions, allowing for zipped extensions.
    """
    base, ext = os.path.splitext(f)
    if ext in [".gz", ".bz2", ".zip"]:
        base, ext2 = os.path.splitext(base)
        ext = ext2 + ext
    return base, ext
def splitext_plus ( f ) : base , ext = os . path . splitext ( f ) if ext in [ ".gz" , ".bz2" , ".zip" ] : base , ext2 = os . path . splitext ( base ) ext = ext2 + ext return base , ext
Split on file extensions, allowing for zipped extensions.