Каждая новая строка обрамляется тегом table нужно что бы тег table был на все строки, а не на каждую отдельно, как сделать? Хочу что бы была полноценная таблица, а не много маленьких табличек.
#! /usr/bin/python3
# -*- coding: utf-8 -*-
#! /usr/bin/python3
# -*- coding: utf-8 -*-
import cgi, os
import time
import datetime as dt
import datetime
print ("Content-type: text/html\n\n")
print ("<H1>DGFDGFDG</H1>")
now = dt.datetime.now()
now1 = now.strftime("%Y-%m-%d")
ago = now - dt.timedelta(minutes=10)
for root, dirs, files in os.walk("R:\nation"):
for fname in files:
path = os.path.join(root, fname)
st = os.stat(path)
mtime = dt.datetime.fromtimestamp(st.st_mtime)
mtime1 = time.strftime("%d.%m.%Y %H:%M:%S", time.localtime(st.st_mtime))
if mtime < ago:
some_string = '''
<table>
<tr>
<td>{0}</td>
<td>{1}</td>
</tr>
</table>
'''.format(path[26:38],mtime1)
print(some_string)