modelx icon indicating copy to clipboard operation
modelx copied to clipboard

importing modules referencing each other breaks

Open alebaran opened this issue 6 years ago • 2 comments

import_module breaks if I have:

  1. A module "a.py", in which I have import b in the beginning of the file
  2. A module "b.py", in which I have import 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.

alebaran avatar Oct 24 '19 15:10 alebaran

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

fumitoh avatar Oct 24 '19 15:10 fumitoh

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.

alebaran avatar Oct 24 '19 15:10 alebaran