<p>How do I convert a datetime or date object into a POSIX timestamp in python?  There are methods to create a datetime object out of a timestamp, but I don't seem to find any obvious ways to do the operation the opposite way.</p>

```
```
import time, datetime

d = datetime.datetime.now()
print time.mktime(d.timetuple())
```
```