I have a generic issue with IronPython module import processing.
Given a Python package, submodules can refer to each other with relative references. Assume the package is called Poultry and submodules within it are Chicken.py and Duck.py. Chicken can then import Duck simply as "import Duck" and vica versa. A Python script loaded by the application can import the package correctly, can use the submodules and everything works fine.
Directory structure of package looks like this:
+ - Poultry
| - __init__.py
| - Duck.py
L - Chicken.py
However, when I open Duck.py with my application for instance, I can't run and debug it as IronPython throws an import error on line "import Chicken" with the message "No module name Chicken".
I understand this is not strictly an issue with IronPython but the hosting application. In the end the question is, how could I modify my hosting application to process these import statements correctly ? Shall I set some path variable in scope, or what ? How could I make the Python engine understand that the the currently loaded file is the part of a specific package ?
Any ideas are welcome :-)