Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (17 sloc) 0.59 kb
import time
import datetime
order = ['Date', 'Close', ]
def endtime():
return datetime.datetime.now()# - datetime.timedelta(1)
def formatdate(datestr, informat):
t = time.strptime(datestr, informat)
if t.tm_year > 2030: # incorrect interpretation of 2 digit date
t.tm_year -= 100
return time.strftime("%Y-%m-%d", t)
def printdata(rows):
csvrows = [','.join([str(row[k]) for k in order]) for row in rows]
csvrows = list(set(csvrows)) # wtf duplicate rows
csvrows.sort(reverse=True)
print ','.join(order)
for row in csvrows:
print row
Jump to Line
Something went wrong with that request. Please try again.