How do I gzip compress a string in Python?

gzip.GzipFile exists, but that's for file objects - what about with plain strings?

Edit
Report