I think this answer needs an update and the solution would go better this way.
from datetime import datetime
datetime.strptime("29.08.2011 11:05:02", "%d.%m.%Y %H:%M:%S").strftime("%s")
or you may use datetime object and format the time using %s to convert it into epoch time.