uic.load (was: [PyQt] Re: Problem with latest PyQt4 snapshot)

Peter Shinners pshinners at blizzard.com
Tue Sep 22 20:58:47 BST 2009


Please let uic.load take only a simple file path. Anyone can wrap whatever resource finding mechanism they want on top.

-----Original Message-----
From: pyqt-bounces at riverbankcomputing.com [mailto:pyqt-bounces at riverbankcomputing.com] On Behalf Of Arnold Krille
Sent: Tuesday, September 22, 2009 11:35 AM
To: pyqt at riverbankcomputing.com
Subject: Re: uic.load (was: [PyQt] Re: Problem with latest PyQt4 snapshot)

On Tuesday 22 September 2009 19:57:46 Phil Thompson wrote:
> On Tue, 22 Sep 2009 19:42:27 +0200, Arnold Krille 
> <arnold at arnoldarts.de>
> > on a side note: Is it possible to have uic.load() respect the 
> > python-library dirs?
> I'm not convinced it's a good idea...

Security issues?

I think it would be quite cool if

 uic.load( ffado.widgets.mixer, self )

loaded the ffado/widgets.mixer.ui the same as

 import ffado.widgets.mixer

imports ffado/widgets/mixer.py(c), regardless whether its local (ie. relative) found or "only" system-wide.

> It's easy enough to implement something yourself using __file__.

Currently I created an own function which knows about the install path (which is inside the standard python library paths. Well, to be exact, my function first checks if the desired ui-file is reachable via relative paths when a developer is testing ffado-mixer without installing it. Only if that doesn't work, the absolute installation path is used.

Have fun,

Arnold

PS: No need to CC me, I am subscribed;-)



More information about the PyQt mailing list