slpkg & tar2xzm > txz2xzm

Non release banter
User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3925
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
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: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 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: 3925
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
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: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 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: 2065
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: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 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

afrodeity
White ninja
White ninja
Posts: 9
Joined: 25 Aug 2020, 06:39
Distribution: 4.13

slpkg & tar2xzm > txz2xzm

Post#22 by afrodeity » 26 Aug 2020, 15:39

I have 32bit Mate Porteus, in /usr/lib/python2.7 there is only pydoc_data. Do I need to reinstall python from source?

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

slpkg & tar2xzm > txz2xzm

Post#23 by donald » 27 Aug 2020, 00:07

@afrodeity
You need to clean your changes folder or savedat container.
Because it is not the only "missing files" issue you have,
it seems you screwed up your installation.

As always in such a case:
Boot into Always Fresh mode and check the content of /usr/lib/python2.7
The files/Folders are there.
So what happend? -- someone/somewhat has created whiteout files which
make the files invisible to the system/you.
The files are still there as long as you didn't alter the base modules.
[they are read only by default]

Post Reply