Function | locate_file |
Find file relative to a source file, e.g. locate_file("foo/bar.txt", __file__) |
Variable | LOGGER |
Undocumented |
Function | _adjust_cli_sys_path |
Ensures current directory is on sys.path, and __main__ directory is not. |
Function | _get_revised_path |
Ensures current directory is on returned path, and argv0 directory is not |
Find file relative to a source file, e.g. locate_file("foo/bar.txt", __file__)
Succeeds regardless to context of execution
Parameters | |
file_name:str | Undocumented |
executing_file:str | Undocumented |
Returns | |
str | Undocumented |
Ensures current directory is on sys.path, and __main__ directory is not.
Exception: __main__ dir is left alone if it's also pydoc's directory.
Ensures current directory is on returned path, and argv0 directory is not
Exception: argv0 dir is left alone if it's also pydoc's directory.
Returns a new path entry list, or None if no adjustment is needed.
Parameters | |
current_python_path:List[ | Undocumented |
script_path:str | Undocumented |
Returns | |
Optional[ | Undocumented |