[Zope-dev] Relative Imports: PEP-328

Sidnei da Silva sidnei at enfoldsystems.com
Tue Oct 7 23:14:29 EDT 2008


I'm trying to fix some import errors, which seem to be related to PEP-328.

I'm fixing those errors this way, though I don't know if that's the
recommended way of fixing it. Thoughts?

"""
try:
    from DT_Util import parse_params, name_param
except ImportError:
    # See PEP-328
    from .DT_Util import parse_params, name_param
"""

-- 
Sidnei da Silva
Enfold Systems                http://enfoldsystems.com
Fax +1 832 201 8856     Office +1 713 942 2377 Ext 214


More information about the Zope-Dev mailing list