python\'s time module seems a little haphazard. For example, here is a list of methods in there, from the docstring:
time() -- return current time in second
There is actually an inverse function, but for some bizarre reason, it's in the calendar module: calendar.timegm(). I listed the functions in this answer.