Hi ironpython,
Here's your Daily Digest of new issues for project "IronPython".
In today's digest:ISSUES
1. [New issue] Relative import in non-package error
2. [New comment] Relative import in non-package error
3. [New comment] Relative import in non-package error
4. [New comment] Relative import in non-package error
5. [New comment] Relative import in non-package error
----------------------------------------------
ISSUES
1. [New issue] Relative import in non-package error
http://ironpython.codeplex.com/workitem/32916
User loocas has proposed the issue:
"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"-----------------
2. [New comment] Relative import in non-package error
http://ironpython.codeplex.com/workitem/32916
User slide_o_mix has commented on the issue:
"Can you verify if this works on CPython 2.7.3? From what I have read regarding
relative imports, relative imports only work on packages. The blog post you
mention shows that you are trying to import from lib\ which is a subdirectory
for the shotgun api code, is there an __init__,py in the lib
directory?"-----------------
3. [New comment] Relative import in non-package error
http://ironpython.codeplex.com/workitem/32916
User loocas has commented on the issue:
"Hi, yes, there is __init__.py in the lib directory.
And actually, no, it doesn't seem to be working in CPython 2.7.2 :/ I don't
have any other CPython installed here, so I can't verify that on any other
version.
I got prompted to report this issue here from one of my commenters, so I did.
:D I don't have any experience with relative path name imports, to be
honest."-----------------
4. [New comment] Relative import in non-package error
http://ironpython.codeplex.com/workitem/32916
User slide_o_mix has commented on the issue:
"Is the __init__.py empty?
It was me who asked you to report the issue, I saw the info on twitter and
wanted to make sure the issue was captured and figured out if
possible."-----------------
5. [New comment] Relative import in non-package error
http://ironpython.codeplex.com/workitem/32916
User loocas has commented on the issue:
"Yes, the __init__.py under the lib folder is empty."
----------------------------------------------
----------------------------------------------
You are receiving this email because you subscribed to notifications on
CodePlex.
To report a bug, request a feature, or add a comment, visit IronPython Issue
Tracker. You can unsubscribe or change your issue notification settings on
CodePlex.com.
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
http://mail.python.org/mailman/listinfo/ironpython-users