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

Arnold Krille arnold at arnoldarts.de
Tue Sep 22 19:35:21 BST 2009


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;-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090922/9d1e5ed8/attachment.bin


More information about the PyQt mailing list