import datetime
now = datetime.date.today()
now = str(now)
index = open('/var/www/index.html', 'a')
index.write('<br> $s,' %now)
index.close()
I keep getting the error.
index.write('<br> {now},'.format(now=now))
.format is much better than string-formatting see this