I have a python package which looks like the following:
package/
├── __init__.py
├── PyMySQL-0.7.6-py2.7.egg
├── pymysql
├── PyMySQL-0.7.x.pth
└── tests.py
The folder structure cannot be changed because it is from a third party library.
The contents of the .pth file are
import sys; sys.__plen = len(sys.path)
./PyMySQL-0.7.6-py2.7.egg
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)
Whats the best way to include pymysql in tests.py
I obviously can't use from PyMySQL-0.7.6-py2.7.egg
because the folder name contains dots.
P.S. absolute paths are not known because this code is supposed to be deployed to AWS lambda