-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relative import still doesn't work? #26
Comments
I don't think this works as an ordinary Python script: $ python src/server.py
Traceback (most recent call last):
File "src/server.py", line 1, in <module>
from .foo import getab
ImportError: attempted relative import with no known parent package |
Ah I see, if I just add an ordinary executable script that imports |
As in make stickytape make the example work, even though the example doesn't work when running it as an ordinary Python script? It might be possible, but I think that stickytape should stick to normal Python behaviour where possible. |
Sorry, I mean make stickytape combine scripts that can be imported instead of being executed, but I guess that's beyond the scope of this tool. Thanks |
Reproduction
mkdir -p foo/src cd foo touch src/__init__.py
Create the following files:
src/server.py
:src/foo.py
:Run:
Info
OS: macOS 11.4
stickytape: 0.2.1
Related: #22 #24
The text was updated successfully, but these errors were encountered: