How to deal with Python long import
<p>This is about python long import like this:</p>

<p>from aaa.bbb.ccc.ddd.eee.fff.ggg.hhh.iii.jjj.kkk.lll.mmm.nnn.ooo import xxx</p>

<p>The length between 'from' and 'import' is already above than 80 characters, is there any better pythonic ways to deal with it?</p>

<p>You can always wrap lines using the <code>\</code> character at the end of the line.</p>

<pre><code>from a.very.long.and.unconventional.structure.\
         and.name import foo
</code></pre>

<p>For multiple statements to import after the <code>from x import</code> statement, you can use parentheses and wrap inside these parentheses without a newline escape:</p>

<pre><code>from foo.bar import (test,
                     and,
                     others)
</code></pre>

python python-import