Hi,
I'm having trouble with relative path imports in IronPython 2.7.3.
I add paths to the modules in my code (via sys.path.append()) so the modules are accessible. However, one of the modules I'm trying to import contains the following relative path import statement:
from .lib.httplib2 import Http, ProxyInfo, socks
When IronPython is trying to import the modules it errors out with this stderr:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\duber\Shotgun\3.0.9b2\shotgun.py", line 52, in <module>
ValueError: Attempted relative import in non-package
As soon as I remove the relative path notation (deleting the first dot from the import statement), all runs smoothly without issues.
If you want to try this exact scenario out, here is an article about what is needed in order to run the Shotgun API:
http://blog.duber.cz/software/calling-shotgun-api-3-0-9b2-from-ironpython-2-7-3