Skip to content

Instantly share code, notes, and snippets.

View nailor's full-sized avatar

Jyrki Pulliainen nailor

View GitHub Profile
@nailor
nailor / .pdbrc
Created August 4, 2011 16:18 — forked from esamattis/.pdbrc
What every python developer should have in their ~/.pdbrc
# Enable tab completion
import rlcompleter
import pdb
pdb.Pdb.complete = rlcompleter.Completer(locals()).complete
# Sometimes when you do something funky, you may lose your terminal echo. This
# should restore it when spanwning new pdb.
import termios, sys
termios_fd = sys.stdin.fileno()
termios_echo = termios.tcgetattr(termios_fd)
@nailor
nailor / uuid.py
Created May 26, 2009 12:52 — forked from mmalone/uuid.py
import socket
def sockrecv(sock):
d = ''
while not d or d[-1] != '\n':
d += sock.recv(8192)
return d