[PyKDE] Unchecked plugin directory access
lmancini at develer.com
Thu Dec 21 13:49:49 GMT 2006
in PyQt 4.1.1 and snapshot 20061220, class QObjectCreator makes an
unchecked access to widget-plugins directory in its constructor:
plugindir = os.path.join(os.path.split(__file__),
for filename in os.listdir(plugindir):
The above code gets executed if you build your UIs with Designer and
then use loadUi in your application. There is nothing wrong with that,
as long as you run your programs through the Python interpreter.
However, should one try to package the appplication with PyInstaller,
py2exe and similar tools, that would be an issue, since likely that
directory won't be available in "frozen" state.
Moreover, if I understood correctly that directory is only useful if you
have certain widgets in your application.
So, is it reasonable to have a runtime check for that directory's
existance (with os.path.exists, before the for loop)?
Thanks in advance!
More information about the PyQt