How to Use Sys.path.append() in Python
https://linuxhint.com/sys-path-append-pythonprint( file1. secret) secret = “This is the secret phrase”. When we append the path using the sys.path.append () method, we first append the location of the module to Path, and then import it. If done in such a manner, the Python interpreter should be able to locate the requested module, and therefore retrieve the secret variable.
Relative paths in Python - Stack Overflow
https://stackoverflow.com/questions/91815428.05.2009 · It's 2018 now, and Python have already evolve to the __future__ long time ago. So how about using the amazing pathlib coming with Python 3.4 to accomplish the task instead of struggling with os, os.path, glob, shutil, etc.. So we have 3 paths here (possibly duplicated): mod_path: which is the path of the simple helper script; src_path: which contains a couple of …