I bumped into this statement in a Python script: sys.path.append("..")
I did some research, but I could not find what it does.
I know sys.path.append()
function appends a path at the end of the PYTHONPATH list. But what does ".."
stand for?
Needless to say, this Python scripts does not work if I comment the line.
..
to the paths that Python searches for imports, so you can import things from..
(which is the parent of the current directory) . – Otosys.path.append("..")
tosys.path.append(absolute-path-to-parent-directory)
, it does not work and throw aModuleNotFoundError
when I try to load a module from that directory... – Staton