Python Forum
source of python-wstools has two corrupt .gz files in Ubuntu Linux
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
source of python-wstools has two corrupt .gz files in Ubuntu Linux
#1
Ubuntu Linux has a package named "python-wstools" that installed a number of files including two .gz files. the package in PyPI of the same name does not have any .gz files so i must conclude Ubuntu packagers added them. they a both in the "tests" subdirectory which the PyPI package did not have. so i am inclined to blame Ubuntu for them being corrupt.

here's what i wonder. these are in a python-2.7 directory, only. does this even matter now that Python2 is well past EoL?

Output:
ModuleNotFoundError: No module named 'wstools'
i guess not.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
Do it the normally way with Python i never use Distors internal packages(often not updated) for Python.
Quick test.
tom@tom-VirtualBox:~$ python -m venv ws_env
tom@tom-VirtualBox:~$ cd ws_env
tom@tom-VirtualBox:~/ws_env$ source bin/activate

(ws_env) tom@tom-VirtualBox:~/ws_env$ pip install wstools
Collecting wstools .....
Successfully installed pbr-5.6.0 six-1.16.0 wstools-0.4.8

(ws_env) tom@tom-VirtualBox:~/ws_env$ python
Python 3.9.1 (default, Jan 25 2021, 15:34:59) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wstools
>>> 
>>> wstools.__version__
'0.4.8'
>>> exit()

(ws_env) tom@tom-VirtualBox:~/ws_env$ pip list
Package    Version
---------- -------
pbr        5.6.0
pip        21.1.3
setuptools 49.2.1
six        1.16.0
wstools    0.4.8
Reply
#3
In many versions of Ubuntu, packages for python 3 start with the prefix python3- . For example I see a package python3-wstool in my Ubuntu packages (note that there is no final 's'). That said, it is true that distro's python modules are often outdated. I often manage them with pip and the --user switch, for example
Output:
pip install --user -U wstools
Reply
#4
if i was seriously going to use the package, i'd install it with pip, too. this is probably a good example why. i think it was a leftover from playing around (not serious usage) in an earlier Ubuntu.

i discovered these files while testing a script (zhash.py) that does a hash of the uncompressed form of files in a tree. it used my not-yet-released module named zopen that compresses or uncompresses files based on the file name extension(s). it also uses my ftrgen module to flatten the file tree. i wanted to give something big to do some long timing so i ran it for /usr. when writing a file, zopen() can write to a temporary file name and move the temporary name to the target name given when it is closed.

compressing_file = zopen('foo.gz.bz2.xz','w',tempname=True)
if the file name has multiple compression extensions (sometimes useful) it handles them. one hazard i ran into was a file with a few hundred trillion binary zeros that double compressed very small. it had no idea that this would take most of a day to uncompress. compressing it took a whole weekend.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  what stand-alone python-aware open-source editors are around? Skaperen 14 1,980 Jun-11-2023, 11:12 PM
Last Post: Skaperen
  Pandas + PIL on Linux (Python 32) Clives 3 2,032 Mar-25-2022, 07:46 PM
Last Post: snippsat
  python-3.10.0-amd64 build corrupt? lohphat 4 2,344 Nov-21-2021, 09:28 AM
Last Post: Axel_Erfurt
  New open-source Python SDK for NEO blockchain Marsum 0 2,106 Aug-28-2020, 09:16 AM
Last Post: Marsum
  Python 3.8 to be in Ubuntu 20.04 Focal Fossa LTS Skaperen 4 4,043 Oct-31-2019, 12:14 AM
Last Post: Skaperen
  finding which source files import a module Skaperen 3 2,426 Apr-22-2019, 09:28 PM
Last Post: Gribouillis
  Uninstall Python-3.5 source xion824 3 4,415 Dec-21-2018, 08:18 PM
Last Post: metulburr
  Where can I get information about internal logic of source code Python? AlekseyPython 1 2,488 Dec-17-2018, 05:27 AM
Last Post: siripriya
  how to install python on linux manchun 5 4,448 Mar-01-2018, 09:09 AM
Last Post: wavic
  many versions on python on linux Skaperen 8 5,678 Oct-17-2017, 02:22 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020