[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using __init__.py

I am working on a (cross-platform) project. On linux system, the imprts work fine, but in windows I get imort error (I have no idea why. I tried searching everywhere, but couldn't get it to work).
Anyways, the issue seem to be resolved by adding project directory to sys.path().

I wanted to know that can I use __init__.py file for adding a project directory to sys.path (sys.path.insert(0, directory))?