Settings

Theme

Ask HN: How do you handle project level imports in Python?

3 points by atticusberg 8 years ago · 0 comments · 1 min read


I have python project called xyz. It has a directory structure like this:

  xyz/
    __init__.py
    a.py
    b.py
    c.py

At the top of a.py, I'd like to be able to say something like from c import some_func.

From what I can tell, there are many, many different ways to accomplish this.

I haven't been able to find anything though that is both a) automated and b) clean.

How do you handle this your python projects?

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection