[PyQt] Relative imports in compiled UI files?

Virgil Dupras hsoft at hardcoded.net
Tue Aug 17 15:06:07 BST 2010

I recently ported one of my apps to Python 3, and one of the headaches
I had was because import statements in compiled UI files aren't
relative ("from . import foo"). In python 2, it wasn't a problem
because the lookup was made in the same folder as the module importing
the thing, but under Python 3, I had to tweak my sys.path to make it
work. If there was a way to generate relative imports, that would be a
cleaner solution than my sys.path hackage.

So, possible? If not, can I hope on it being implemented some day?

Virgil Dupras

More information about the PyQt mailing list