Skip to content
This repository has been archived by the owner on Jun 20, 2018. It is now read-only.

Relative imports #83

Open
ghost opened this issue Jun 16, 2014 · 6 comments
Open

Relative imports #83

ghost opened this issue Jun 16, 2014 · 6 comments

Comments

@ghost
Copy link

ghost commented Jun 16, 2014

I'd like to change to relative imports as I want to run gargoyle inside my apps/ dir.
Let me know what you think about that.

@mattrobenolt
Copy link
Collaborator

Then you should add that directory to your sys.path. --Matt Robenolt@mattrobenoltOn Mon, Jun 16, 2014 at 3:07 AM -0700, "AndersenTobias" [email protected] wrote:

I'd like to change to relative imports as I want to run gargoyle inside my apps/ dir.
Let me know what you think about that.

—Reply to this email directly or view it on GitHub.

@ghost
Copy link
Author

ghost commented Jun 16, 2014

@mattrobenolt Then nexus/modules.py L38 fails. Do I add media_root to gargoyle?

@mattrobenolt
Copy link
Collaborator

@AndersenTobias I'm not sure what you're even asking me. What's media_root?

@ghost
Copy link
Author

ghost commented Jun 17, 2014

@mattrobenolt Sorry for being unclear; I appreciate your patience.
(Never mind the media_root thing. It was confusion on my part as usual).

Can you please expand on why you think relative imports is a bad idea? I have a patch for it ready.

@giftig
Copy link

giftig commented Oct 1, 2015

@AndersenTobias PEP 328 suggests not using relative imports unless you really have to. Read https://www.python.org/dev/peps/pep-0328/ for an analysis.

@ghost
Copy link
Author

ghost commented Oct 1, 2015

@giftig thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants