When do I require using __init__.py?
问题 I have the following structure: /blog /app /static staticfile.py /templates templatefile.py run.py In run.py I have, from app.static import staticfile print("you run me") In staticfile.py I have, print("ran from staticfile") When I run python run.py I get, ran from staticfile you run me I do not have __init__.py anywhere and I do not have a virtual environment. How does my reference work without the __init__.py file? Is it because I'm using Python 3.4? I am in Windows 7 if it matters. EDIT: