I know this exists in other languages, but I want it for Python to I can send emails that\'ll show up in GMail, etc.
http://blog.doughellmann.com/2008/10/pymotw-smtplib.html great example from doug
toronado is Fast lxml-based CSS stylesheet inliner.
Installation : pip install toronado
Example :
import toronado
document = """<html>
<head>
<style type="text/css">
h1 { color: red; }
</style>
</head>
<body><h1>Hello, world.</h1></body>
</html>"""
print(toronado.from_string(document))
I had to do the same thing a while back and put the module I made for it up on GitHub https://github.com/rennat/pynliner
There are now many choices for this. Here are two more in what seems to be decreasing order of activity: