[PyQt] Determining location of pyqtdeployed app at runtime
phil at riverbankcomputing.com
Sat Aug 2 08:58:38 BST 2014
On 02/08/2014 7:37 am, Dave Gradwell wrote:
> Hm, odd, I'm on v0.5.
> admins-Mac-2:~ admin$ python3.4
> QtCore.QFileInfo(__file__).absolutePath() --->
> admins-Mac-2:~ admin$
> QtCore.QFileInfo(__file__).absolutePath() ---> /Users/admin
It should start with ':/'.
I'm saying it *should* work, which is not quite the same as it *does*
Before the next release I will be able to pyqtdeploy pyqtdeploy so that
should flush out any bug.
> Okay, I'll hack it for now with:
> import pyqtdeploy
> PATH_TO_ICONS = os.path.dirname(sys.executable) + "/icons/"
> except ImportError:
> PATH_TO_ICONS = QtCore.QFileInfo(__file__).absolutePath() +
> ... or something.
A heads up - the pyqtdeploy module will be renamed to pdytools.
More information about the PyQt