<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">I hadn’t thought of compiling the generated .py file into a .pyc. Clever. I’ll try it the next time I reach a milestone worthy of an attempted single-file compile.</div>
<div name="messageReplySection"><br />
On Jan 4, 2018, 6:00 AM -0600, pyqt-request@riverbankcomputing.com, wrote:<br />
<blockquote type="cite">Send PyQt mailing list submissions to<br />
pyqt@riverbankcomputing.com<br />
<br />
To subscribe or unsubscribe via the World Wide Web, visit<br />
https://www.riverbankcomputing.com/mailman/listinfo/pyqt<br />
or, via email, send a message with subject or body 'help' to<br />
pyqt-request@riverbankcomputing.com<br />
<br />
You can reach the person managing the list at<br />
pyqt-owner@riverbankcomputing.com<br />
<br />
When replying, please edit your Subject line so it is more specific<br />
than "Re: Contents of PyQt digest..."<br />
<br />
<br />
Today's Topics:<br />
<br />
1. Re: Massive inflation of .qrc files (Phil Thompson)<br />
2. Re: Massive inflation of .qrc files (Giuseppe Corbelli)<br />
3. Re: Massive inflation of .qrc files (Phil Thompson)<br />
4. Re: Massive inflation of .qrc files (Pou Belle)<br />
<br />
<br />
----------------------------------------------------------------------<br />
<br />
Message: 1<br />
Date: Wed, 3 Jan 2018 12:19:53 +0000<br />
From: Phil Thompson <phil@riverbankcomputing.com<br />
To: Giuseppe Corbelli <corbelligiuseppe@mesdan.it<br />
Cc: pyqt@riverbankcomputing.com<br />
Subject: Re: [PyQt] Massive inflation of .qrc files<br />
Message-ID:<br />
<A8E54CDE-A130-40D5-A8C8-F8E811E97838@riverbankcomputing.com<br />
Content-Type: text/plain; charset=us-ascii<br />
<br />
On 3 Jan 2018, at 11:00 am, Giuseppe Corbelli <corbelligiuseppe@mesdan.it> wrote:<br />
<blockquote type="cite"><br />
On 01/03/2018 10:50 AM, Phil Thompson wrote:<br />
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">I've tried putting "splash.hide()" as late in the execution order as possible, but it's still fast. I'm not going to cheat and use "sleep()" :-)<br />
<br />
Does anyone have any insight? I can reduce the quality of the image (since it's shown so briefly), but if the resulting resource file is so large, there's not much point. And 97Kb is hardly a large image.<br /></blockquote>
Using pyrcc is rarely a good idea.<br /></blockquote>
<br />
What would be your recommended approach to create a resource bundle?<br /></blockquote>
pyrcc is the only way to create a resource file for Python. The question is, why create a resource file at all?<br /></blockquote>
<br />
First thing that comes to mind is easier distribution in multiple formats (wheel, frozen...)<br /></blockquote>
<br />
I don't think it makes it any easier, see...<br />
<br />
http://pyqt.sourceforge.net/Docs/pyqtdeploy/pyrcc.html<br />
<br />
Phil<br />
<br />
------------------------------<br />
<br />
Message: 2<br />
Date: Wed, 3 Jan 2018 15:31:25 +0100<br />
From: Giuseppe Corbelli <corbelligiuseppe@mesdan.it<br />
Cc: pyqt@riverbankcomputing.com<br />
Subject: Re: [PyQt] Massive inflation of .qrc files<br />
Message-ID: <7e523687-6596-0995-9258-5a757bdeb415@mesdan.it<br />
Content-Type: text/plain; charset=utf-8; format=flowed<br />
<br />
On 01/03/2018 01:19 PM, Phil Thompson wrote:<br />
<blockquote type="cite">
<blockquote type="cite">On 01/03/2018 10:50 AM, Phil Thompson wrote:<br />
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">I've tried putting "splash.hide()" as late in the execution order as possible, but it's still fast. I'm not going to cheat and use "sleep()" :-)<br />
<br />
Does anyone have any insight? I can reduce the quality of the image (since it's shown so briefly), but if the resulting resource file is so large, there's not much point. And 97Kb is hardly a large image.<br /></blockquote>
Using pyrcc is rarely a good idea.<br /></blockquote>
<br />
What would be your recommended approach to create a resource bundle?<br /></blockquote>
pyrcc is the only way to create a resource file for Python. The question is, why create a resource file at all?<br /></blockquote>
<br />
First thing that comes to mind is easier distribution in multiple formats (wheel, frozen...)<br /></blockquote>
<br />
I don't think it makes it any easier, see...<br />
<br />
http://pyqt.sourceforge.net/Docs/pyqtdeploy/pyrcc.html<br /></blockquote>
<br />
Sorry but I think I am missing something. Let's say I'm NOT using<br />
pyqtdeploy.<br />
I can deploy a wheel with the resource tree and use pkg_resources api.<br />
With pyinstaller I am forced to use resource-only eggs.<br />
Qt resources system + pyrcc is the only transparent solution I can think.<br />
<br />
--<br />
Giuseppe Corbelli<br />
<br />
<br />
------------------------------<br />
<br />
Message: 3<br />
Date: Wed, 3 Jan 2018 17:10:50 +0000<br />
From: Phil Thompson <phil@riverbankcomputing.com<br />
To: Giuseppe Corbelli <corbelligiuseppe@mesdan.it<br />
Cc: pyqt@riverbankcomputing.com<br />
Subject: Re: [PyQt] Massive inflation of .qrc files<br />
Message-ID:<br />
<527C6C48-15A2-4526-AB8F-2E89C4BB5151@riverbankcomputing.com<br />
Content-Type: text/plain; charset=us-ascii<br />
<br />
On 3 Jan 2018, at 2:31 pm, Giuseppe Corbelli <corbelligiuseppe@mesdan.it> wrote:<br />
<blockquote type="cite"><br />
On 01/03/2018 01:19 PM, Phil Thompson wrote:<br />
<blockquote type="cite">
<blockquote type="cite">On 01/03/2018 10:50 AM, Phil Thompson wrote:<br />
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">I've tried putting "splash.hide()" as late in the execution order as possible, but it's still fast. I'm not going to cheat and use "sleep()" :-)<br />
<br />
Does anyone have any insight? I can reduce the quality of the image (since it's shown so briefly), but if the resulting resource file is so large, there's not much point. And 97Kb is hardly a large image.<br /></blockquote>
Using pyrcc is rarely a good idea.<br /></blockquote>
<br />
What would be your recommended approach to create a resource bundle?<br /></blockquote>
pyrcc is the only way to create a resource file for Python. The question is, why create a resource file at all?<br /></blockquote>
<br />
First thing that comes to mind is easier distribution in multiple formats (wheel, frozen...)<br /></blockquote>
I don't think it makes it any easier, see...<br />
http://pyqt.sourceforge.net/Docs/pyqtdeploy/pyrcc.html<br /></blockquote>
<br />
Sorry but I think I am missing something. Let's say I'm NOT using pyqtdeploy.<br />
I can deploy a wheel with the resource tree and use pkg_resources api.<br /></blockquote>
<br />
As a wheel is expanded to the filesystem I don't see the need for any API to access a data file included in the wheel.<br />
<br />
<blockquote type="cite">With pyinstaller I am forced to use resource-only eggs.<br />
Qt resources system + pyrcc is the only transparent solution I can think.<br /></blockquote>
<br />
I've never used pyinstaller.<br />
<br />
Phil<br />
<br />
------------------------------<br />
<br />
Message: 4<br />
Date: Thu, 4 Jan 2018 11:47:54 +0100<br />
From: Pou Belle <belepoub@gmail.com<br />
To: pyqt@riverbankcomputing.com<br />
Subject: Re: [PyQt] Massive inflation of .qrc files<br />
Message-ID:<br />
<CAH27=-8EXjDq=PF2-UHSZHvuFqBe+fHD+9AR4KgEwb4M+cg35A@mail.gmail.com<br />
Content-Type: text/plain; charset="utf-8"<br />
<br />
*Scott Harvey wrote*<br />
*> I've noticed that compiling a .qrc file into a qrc.py file results in a*<br />
*> massive increase in size, especially when containing an image.*<br />
*> *<br />
*> File Size*<br />
*> ------- -----------*<br />
*> splash.png 97244*<br />
*> splash.qrc 86*<br />
*> splash_qrc.py 402588*<br />
<br />
<br />
*Hello Scott,*<br />
<br />
*Compile your splash_qrc.py into a splash_qrc.pyc file, it will become very<br />
small again.*<br />
<br />
*Here is what I get on my current project :*<br />
<br />
*File Size*<br />
*Resources (png, jpg) : 124172*<br />
*resources.qrc : 429*<br />
*resources_rc.py : 373507*<br />
*resources_rc.pyc : 89712*<br />
<br />
*The only file that will really be loaded by python (pyc : 89712) is even<br />
smaller than the sum of the original files (124172).*<br />
*pyrcc is making my life a lot easier, I love it.*<br />
<br />
*Cheers.*<br />
-------------- next part --------------<br />
An HTML attachment was scrubbed...<br />
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180104/84141ba7/attachment-0001.html<br />
<br />
------------------------------<br />
<br />
Subject: Digest Footer<br />
<br />
_______________________________________________<br />
PyQt mailing list<br />
PyQt@riverbankcomputing.com<br />
https://www.riverbankcomputing.com/mailman/listinfo/pyqt<br />
<br />
------------------------------<br />
<br />
End of PyQt Digest, Vol 162, Issue 4<br />
************************************<br /></blockquote>
</div>
</body>
</html>