slpkg & tar2xzm > txz2xzm

Non release banter
User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 2204
Joined: 20 Mar 2012, 03:42
Distribution: 5.0rc1-64bit all-DE+more
Location: australia
Contact:

slpkg & tar2xzm > txz2xzm

Post#16 by ncmprhnsbl » 05 Apr 2019, 01:09

yeah, had i looked little harder, i would have noticed that *.pyc and *.pyo s are stripped :happy62:
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Ed_P
Contributor
Contributor
Posts: 5101
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

slpkg & tar2xzm > txz2xzm

Post#17 by Ed_P » 05 Apr 2019, 03:12

"stripped"?? They do look "strange" in Text Editor, hex and text show, but all 3 are 90kb.
Ed

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 2204
Joined: 20 Mar 2012, 03:42
Distribution: 5.0rc1-64bit all-DE+more
Location: australia
Contact:

slpkg & tar2xzm > txz2xzm

Post#18 by ncmprhnsbl » 05 Apr 2019, 03:35

Ed_P wrote:
05 Apr 2019, 03:12
"stripped"??
as in removed in the porteus build process.
if you compare the slackware python2 package with what's in porteus, you'll see lots of unecessary stuff removed..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Ed_P
Contributor
Contributor
Posts: 5101
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

slpkg & tar2xzm > txz2xzm

Post#19 by Ed_P » 05 Apr 2019, 04:08

:hmmm: Yes, and so too the pydoc.py file and it is obviously needed. What about the hex stuff in the other two pydoc files? Are they corrupt or does it serve a purpose?
Ed

donald
Full of knowledge
Full of knowledge
Posts: 1539
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

slpkg & tar2xzm > txz2xzm

Post#20 by donald » 05 Apr 2019, 07:49

Ed_P wrote:
05 Apr 2019, 04:08
What about ...the other two pydoc files?
Are they corrupt or does it serve a purpose?
Some quotes from the i-net
(personally, I know next to nothing about python)
.py - Regular script
.pyc - compiled script (Bytecode)
.pyo - optimized pyc file (As of Python3.5, Python will only use pyc rather than pyo and pyc)
.py: This is normally the input source code that you've written.
.pyc: This is the compiled bytecode. If you import a module, python will build a *.pyc file
that contains the bytecode to make importing it again later easier (and faster).
.pyo: This is a *.pyc file that was created while optimizations (-O) was on.
A program doesn't run any faster when it is read from a ‘.pyc’ or ‘.pyo’ file than when it is read
from a ‘.py’ file; the only thing that's faster about ‘.pyc’ or ‘.pyo’ files
is the speed with which they are loaded.

User avatar
Ed_P
Contributor
Contributor
Posts: 5101
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

slpkg & tar2xzm > txz2xzm

Post#21 by Ed_P » 05 Apr 2019, 14:38

Thank you :worthy: donald.
donald wrote:
05 Apr 2019, 07:49
(personally, I know next to nothing about python)
I can relate. I didn't know python was a script language like bash until 2 months ago.
donald wrote:
05 Apr 2019, 07:49
.py - Regular script
.pyc - compiled script (Bytecode)
.pyo - optimized pyc file (As of Python3.5, Python will only use pyc rather than pyo and pyc)
"use pyc rather than pyo and pyc"!!? Interesting.
donald wrote:
05 Apr 2019, 07:49
A program doesn't run any faster when it is read from a ‘.pyc’ or ‘.pyo’ file than when it is read
from a ‘.py’ file; the only thing that's faster about ‘.pyc’ or ‘.pyo’ files
is the speed with which they are loaded.
The 3 files are all ~90kb so I don't see how one will load faster than the others. Anyways, interesting quotes donald. :beer:
Ed

Post Reply