Created
March 2, 2016 12:32
-
-
Save ak1211/3a9db551575074f88595 to your computer and use it in GitHub Desktop.
これHTMLのひな形にデータを入れている
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buf = [] | |
for num, item in enumerate (start_session_logs): | |
st = item | |
tm = item["terminate log"] | |
text = "[ '{0}', '{1}'".format (1+num, st["User"]) | |
text = text + ", new Date({0})".format (st["DateTime"].strftime ('%Y, %m, %d, %H, %M, %S')) | |
if tm: | |
text = text + ", new Date({0})".format (tm["DateTime"].strftime ('%Y, %m, %d, %H, %M, %S')) | |
text = text + "]," | |
buf.append (text) | |
buf[-1] = buf[-1].rstrip(',') | |
#print start_and_term_relationship | |
datarows = "\n ".join (buf) | |
print html.format(datarows) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment