I actually spent time wrestling with exactly this earlier today, and I think I finally have a 2 line solution for it:
Assuming `foo.bar` is a script inside the package `foo` that you want to both import and run directly (without `python -m ...`), this lets you do so without too much hassle.