def check_under_base(path, base, os_sep=os.sep):
prefix = base if base.endswith(os_sep) else base + os_sep<EOL>return os.path.normcase(path).startswith(os.path.normcase(prefix))<EOL>
Check if given absolute path is under given base.

:param path: absolute path
:type path: str
:param base: absolute base path
:type base: str
:param os_sep: path separator, defaults to os.sep
:return: wether file is under given base or not
:rtype: bool