For example we will read documentation for tuple:
$ python3 -m pydoc tuple
For example we will read documentation for tuple:
$ python3 -m pydoc tuple
Installing new version ex: python3.10and running:
virtualenv --python=/usr/bin/python3.10 ven
will encounter
he following packages were automatically installed and are no longer required:
libdvdnav4 libdvdread7 libegl-mesa0 libegl1 libfwupdplugin1 libjansson4 libldb2 liblua5.2-0 libpython3.11-minimal libpython3.11-stdlib libsmbclient libtalloc2 libtevent0 libva-wayland2 libwbclient0 libxmlb1
mpv python3-ldb python3-pyxattr python3-talloc python3.11-minimal rtmpdump samba-libs
What you need is this:
$ sudo apt-get install python3.10-distutils
Also pip will complain:
from pip._vendor import html5lib, requests
ImportError: cannot import name 'html5lib' from 'pip._vendor' (/home/sup/scripts/Ton/lave_telegram_bot/venv/lib/python3.10/site-packages/pip/_vendor/__init__.py)
$ curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
Another pip error
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for crc16
Fix:
$ sudo apt install python3.10-dev
Comprehensive video about str and bytes
Script to get ICMP packet data:
https://gist.github.com/Paulius11/a49d9c8443d7477bb546f85c4a098d9f
Working with TCP/IP protocol stack:
Ethernet Frame Format
eth_header=struct.unpack('!6s6sH', data)
Internet Protocol Header
|
# s char[] bytes
# H (unsigned short) Integer = 2 (standard octets)
# B Integer = 1 (standard octets)
eth_header=struct.unpack('!6s6sH', data)
icmp_type, code, checksum, packet_id, sequence = struct.unpack('!BBHHH', packet[20:28])
https://www.binarytides.com/python-packet-sniffer-code-linux/ -
https://www.bitforestinfo.com/blog/02/15/how-to-write-simple-packet-sniffer.html