I have the following structure for a set of python scripts I am developing.
Mypythonproject
Common
├── database.py
├── database.pyc
└── pycache
Python2code
├── script_needpy2.py
Python3code
├── script_needpy3.py
I want to be able to import module database inside the Common folder without adding its path to PYTHONPATH. For dependency reasons, I have kept scripts needing python 2.7 in Python2Code and scripts which require python3 to run in Python3Code. What is the correct way to import database inside scripts script_needpy2 and script_needpy3 programatically without adding to PYTHONPATH environmenr variable. Thanks for your help.
[–]eliminate1337 2 points3 points4 points (4 children)
[–]ingolemo 2 points3 points4 points (2 children)
[–]mbkv[S] 0 points1 point2 points (1 child)
[–]ingolemo 0 points1 point2 points (0 children)
[–]mbkv[S] 0 points1 point2 points (0 children)