Skip to content

Instantly share code, notes, and snippets.

@cameron
Created July 7, 2011 02:12
Show Gist options
  • Save cameron/1068775 to your computer and use it in GitHub Desktop.
Save cameron/1068775 to your computer and use it in GitHub Desktop.
#! /usr/bin/env python
import time
LOG = '/tmp/dev_log'
def log_development():
entries = []
while True:
input = raw_input()
if input == '':
open(LOG, 'a').write(reduce(lambda x,y: x + "%s -- %s\n" % (y[0], y[1]), entries, ''))
break
else:
entries.append([time.ctime(), input])
if __name__ == "__main__":
log_development()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment