def file_name_without_extension(path):
    """
    Return the file name without extension.

    Examples: ::

        /foo/bar.baz => bar
        /foo/bar     => bar
        None         => None

    :param string path: the file path
    :rtype: string
    """
    if path is None:
        return None
    return os.path.splitext(os.path.basename(path))[0]
Return the file name without extension.

    Examples: ::

        /foo/bar.baz => bar
        /foo/bar     => bar
        None         => None

    :param string path: the file path
    :rtype: string