Python folder structure for project directory and easy import
问题 My team has a folder of several small projects in python3. Amongst them, we have a utility folder with several utility functions, that are used throughout the projects. But the way to import it is very uncomfortable. This is the structure we use: temp_projects util storage.py geometry.py project1 project1.py project2 project2.py The problem is that the import in the projects looks terrible: sys.path.insert(1, os.path.join(sys.path[0], '..')) import util.geometry util.geometry.rotate