structure:
-- tst
------ __init__.py
------ app.py
assume execution is as follows:
python27 app.py
assume __init__.py
has another import in it, for the sake of question, import os
if i execute app.py
directly, how do I ensure __init__.py
is executed also? assume there are MANY modules called tst
, and calling import tst
from app.py
is ambiguous (or is it?).
is there something like this:
app.py:
import . # import parent folder module, basically tell py27 to execute __init__.py
yes, i understand i can solve all my issues by just importing the module like a functioning human being, but this question is a python theory type of question -- i've been thinking about this one...