I'm working on a package, and I have a structure like:
mypackage/
__init__.py
__main__.py
someotherstuff.py
test/
__init__.py
testsomeotherstuff.py
I've set it up so that the main.py function runs some unit tests, and executing python mypackage from the command-line works fine. However often I want to debut using ipython, but from the interpreter, run mypackage gives the error ERROR: File 'mypackage.py' not found. I can run it manually by doing run mypackage/__main__.py but somehow this seems wrong. Is there something else I should have done to set this up correctly?
%run -m mypackagewas added in a recent version - I don't know if that works for your case.