fumitoh / modelx

Use Python like a spreadsheet!
https://modelx.io
GNU Lesser General Public License v3.0
96 stars 21 forks source link

importing modules referencing each other breaks #18

Open alebaran opened 4 years ago

alebaran commented 4 years ago

import_module breaks if I have: 1) A module "a.py", in which I haveimport b in the beginning of the file 2) A module "b.py", in which I haveimport a in the beginning of the file It is convenient to have such imports, if I want to split large file with lots of cells into 2 files. In this case I need to tell Python IDE that files are related. This helps with refactoring and tracing of dependencies.

fumitoh commented 4 years ago

Is that because of https://stackoverflow.com/questions/744373/circular-or-cyclic-imports-in-python ? Then it's more about Python's issue.

alebaran commented 4 years ago

I understand that this should create an issue in a normal Python execution. But it shouldn't be the case with modelx as it ignores the imports.