I got a problem with python projects. Here is my directory like:
Hotel/
hotel/__init__.py
a.py
b.py
c.py
bin/run.py
README
The whole idea is that I want to write a package hotel, and then I'll write some scripts(run.py) to use that package. So I put
from hotel import a
in to the file run.py.
But however, when I tried to run the run.py file under the directory Hotel with the command:
python ./bin/run.py
There is an import error saying: no module named hotel. But when I use ipython under this directory and when I type
from hotel import a
it works well. I don't know when I am wrong. Could anyone help me?