Skip to content

Instantly share code, notes, and snippets.

@Gribouillis
Gribouillis / self-socket.py
Created February 2, 2025 22:40 — forked from bregma/self-socket.py
Using the self-pipe trick in Python3
#!/usr/bin/python3
#
# Investigate the use of the self-pipe trick from Python
#
import logging
import os
import selectors
import signal
import struct
@Gribouillis
Gribouillis / pycdump.py
Created November 16, 2021 19:56 — forked from anonymous/pycdump.py
Dump .pyc file (Python 3.5 version)
#
# read a .pyc file and pretty-print it
#
# copied from http://nedbatchelder.com/blog/200804/the_structure_of_pyc_files.html
# and updated to Python 3.5 (Nov 10th 2015)