[PyQt] Finding the app folder under pyqtdeploy

Dave Gradwell davegradwell at yahoo.co.uk
Tue Aug 5 20:24:54 BST 2014


Hi,

> perhaps a try/except block around "import pyqtdeploy"?]
That's what works for me.

try:
    import pyqtdeploy
    PATH_TO_ICONS = QtCore.QFileInfo(sys.executable).absolutePath() + "/images/"
except ImportError:
    PATH_TO_ICONS = QtCore.QFileInfo(__file__).absolutePath() + "/images/"

I use two different folders at the moment and just accept that I need to move some things into particular places in the bundle, but perhaps a well placed ".." or cdUp() would be better.

Best, Dave.


--------------------------------------------
On Tue, 5/8/14, David Cortesi <davecortesi at gmail.com> wrote:

 Subject: [PyQt] Finding the app folder under pyqtdeploy
 To: pyqt at riverbankcomputing.com
 Date: Tuesday, 5 August, 2014, 19:03
 

 
 It's not clear to me what the "am I
 bundled" test should consist of -- perhaps a try/except
 block around "import pyqtdeploy"?
 
 
 
 Thanks for any advice,
   Dave Cortesi
 
 [1]http://pyqt.sourceforge.net/Docs/pyqtdeploy/pyqtdeploy_module.html#module-pyqtdeploy
 
 





More information about the PyQt mailing list