title: Why isn't this Python import working?
body: <p>I have three modules:</p>
  
  <p>plugin_grt.py</p>
  
  <p>fragments.py</p>
  
  <p>helpers.py</p>
  
  <p>Right at the top of plugin_grt.py I have</p>
  
  <pre><code>from jpa_export_helpers import SourceFile, Mysql, Conv, Columns, Column, Table, ForeignKey, Index, Catalog, Inheritance
  </code></pre>
  
  <p>which works, that is I can use Table.whateverMethod(...) without problems. Now when I add the same import to the top of the fragments.py module I get:</p>
  
  <pre><code>Traceback (most recent call last):
  
    File "C:\Users\Kawu\AppData\Roaming\MySQL\Workbench\modules\jpa_export_plugin_grt.py", line 53, in &lt;module&gt;
      from jpa_export_helpers import SourceFile, Mysql, Conv, Columns, Column, Table, ForeignKey, Index, Catalog, Inheritance
  
    File "C:\Users\Kawu\AppData\Roaming\MySQL\Workbench\modules\jpa_export_helpers.py", line 2, in &lt;module&gt;
      from jpa_export_fragments import Type, EnumValue
  
    File "C:\Users\Kawu\AppData\Roaming\MySQL\Workbench\modules\jpa_export_fragments.py", line 2, in &lt;module&gt;
      from jpa_export_helpers import SourceFile, Mysql, Conv, Columns, Column, Table, ForeignKey, Index, Catalog, Inheritance
  
  ImportError: cannot import name SourceFile
  </code></pre>
  
  <p>Why isn't this working? The only workaround is to import the classes right where they're needed, but it's not something I like (at least for now):</p>
  
  <pre><code>def getPrimaryKeyColumns(self):
      from jpa_export_helpers import Columns
      return Columns.getPrimaryKeyColumns(self.table.columns)
  </code></pre>
  
  <p>Note, I'm originally a Java guy so importing "at will" seems strange to me. Anyway, what's the problem here?</p>