💾 Archived View for sdf.org › blippy › py.gmi captured on 2024-03-21 at 15:48:08. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
Created 2023-08-10
Create foo.py:
import sys s = sys.argv[1] b = s.encode('latin-1').decode('unicode_escape').encode('utf-8') print(b) print(len(b))
Invoke:
python3 ./foo.py "HI\x01\x00\x02" Output: b'HI\x01\x00\x02' 5