#!/usr/bin/python
import httplib
import json
import time
conn = httplib.HTTPSConnection('mtgox.com')
conn.request('GET', '/code/data/ticker.php')
resp = conn.getresponse()
data = json.load(resp)
print "# at %s" % time.strftime('%Y-%m-%d %H:%M:%S')
print "bitcoin\t%f USD" % data['ticker']['last']

