"import translate" in a way that works with Python 2 and 3 I'm trying to make my script cross-Python (Python 2 and 3 compatible),
and to solve an import problem I did this:

__init__.py file

import sys

if (sys.version_info[0] &lt; 3):
    from core import translate
else:
    from .core import translate


Is it the good way to do it?
No that's not the best way to import in both Python2 and Python3, if you have to support Python 2.5.0a1 and above.
This is as you can use:

from __future__ import absolute_import
from .core import translate


As documented in the __future__ module.