On Wed, 5 Aug 2015 02:14:55 -0600 Eric Snow email@example.com wrote:
On Aug 4, 2015 11:46 PM, "Cameron Simpson" firstname.lastname@example.org wrote:
On 04Aug2015 23:01, Eric Snow email@example.com wrote:
Be sure to read through PEP 495.
Sorry, I meant 395.
I'm sorry for possibly hijacking this thread, but it touches very much issue I had on my mind for a while: being able to run modules inside package as normal scripts. As this thread already has few people knowledgeable of peculiarities of package imports, perhaps they can suggest something.
There's a directory ("pkg" (representing Python namespace package)), and inside it, there's bar.py of not relevant content and foo.py with "from . import bar". What I'd like to do is (while inside "pkg" directory):
SystemError: Parent module '' not loaded, cannot perform relative import
"from . import bar" in foo.py is successful.