import ntpath


def get_filename(path):
    """Returns filename from any Windows and Unix compatible path
    This method runs on any platform (i.e. can parse Windows path when run on Unix platform)
    :param path: Windows path: /a/b/c or C:\a\b\c
    :return: Filename
    """
    head, tail = ntpath.split(path)
    return tail or ntpath.basename(head)