Skip to content

Instantly share code, notes, and snippets.

@dpflug
dpflug / say-hi.py
Last active August 29, 2015 14:01 — forked from zeekay/say-hi.py
#!/usr/bin/env python2
import os, pwd, select, signal, socket, sys, time
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
username = pwd.getpwuid(os.getuid())
hostname = socket.gethostname()
if not sys.stdin.isatty(): sys.stdin = open('/dev/tty')
def hello():