gargoyle icon indicating copy to clipboard operation
gargoyle copied to clipboard

Relative imports

Open ghost opened this issue 11 years ago • 6 comments

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.

ghost avatar Jun 16 '14 10:06 ghost

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.

mattrobenolt avatar Jun 16 '14 10:06 mattrobenolt

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

ghost avatar Jun 16 '14 11:06 ghost

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

mattrobenolt avatar Jun 16 '14 16:06 mattrobenolt

@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.

ghost avatar Jun 17 '14 08:06 ghost

@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.

giftig avatar Oct 01 '15 10:10 giftig

@giftig thanks!

ghost avatar Oct 01 '15 11:10 ghost