Monday morning

snippets Feb 5, 2024

Its Monday morning, and the first coffee has been sacrificed to the SysAdmin gods.
A lot of my code is always dependent on files/functions that are hiding in other directories. This morning with the help of StackOverflow i finally put an end to my search for a proper solution :)

sys.path.append(os.path.realpath(os.path.dirname(__file__).replace(os.path.basename(os.path.dirname(__file__)),'')))

Im told Pathlib would work better :)

Tags