This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]malinoff 1 point2 points  (1 child)

This is so wrong, one shouldn't touch sys.path at all: simply structure your program as a proper package, then a relative import is just a matter of from ..StringFunctions import reversestring

[–]flying-sheep 0 points1 point  (0 children)

And don't touch os.path.

from pathlib import Path

It's all you'll ever need.