Page 2 of 2

slpkg & tar2xzm > txz2xzm

Posted: 05 Apr 2019, 01:09
by ncmprhnsbl
yeah, had i looked little harder, i would have noticed that *.pyc and *.pyo s are stripped :happy62:

slpkg & tar2xzm > txz2xzm

Posted: 05 Apr 2019, 03:12
by Ed_P
"stripped"?? They do look "strange" in Text Editor, hex and text show, but all 3 are 90kb.

slpkg & tar2xzm > txz2xzm

Posted: 05 Apr 2019, 03:35
by ncmprhnsbl
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..

slpkg & tar2xzm > txz2xzm

Posted: 05 Apr 2019, 04:08
by Ed_P
: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?

slpkg & tar2xzm > txz2xzm

Posted: 05 Apr 2019, 07:49
by donald
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.

slpkg & tar2xzm > txz2xzm

Posted: 05 Apr 2019, 14:38
by Ed_P
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: