Im trying to add some libraries within my app to make it more portable.
The problem is that the app is built with not this in mind.
So to be more specific I want to have a folder in my package called libs and keep a copy of the libs used in my app there.
For example lets say I use MySQLdb library. In my app I am importing it like this
import mysqldb
I want to be able to use the same code but having mysqldb inside libs folder.
Is that possible? I tried some things with __init__.py but I failed.
You can just play around with sys.path and should achieve what you want. Just do at the beginning of your program:
This is not a best practice however and you need to be carefull especially if your software will be used as a third-party by other libraries.