import time
today = time.strftime("%d %B %Y")
yesterday = str(int(time.strftime("%d"))-1) + time.strftime(" %B %Y")
print today, yesterday Will work only if 'today' is not the first day of the month, otherwise, it will tell me that yesterday is the 0th of February for example. Is there a SMRT way to use the time module (or any other) to get 'yesterday'?
Aside:
Rather than bumping the other thread again: I got a working MediaWiki bot after finding I was using the wrong version of python with the pywikipediabot.