Skip to content

Instantly share code, notes, and snippets.

import socket
def contains(str, substr):
if str.find(substr) != -1:
return True
else:
return False
if contains(socket.gethostname(), 'webfaction'):
LIVEHOST = True