I was playing around with the inspect module the other day
trying to write a quick and dirty "smart" logger. By this I mean
that writing a message to the global log would also yield some
info about the calling scope. If you look at my function "test"
below, I'd ideally like log messages:
foo.py
I'm parsing a file with the mailbox and email modules and
come across subject headers like:
=?us-ascii?Q?Re=3A=20=5Bosg=2Duser=5D=20Culling=20problem?=
and
=?gb2312?B?cXVlc3Rpb24gYWJvdXQgbG9hZGluZyBmbHQgbGFyZ2UgdGVycmFpbiA=?=
I've looked at the Charset class but can't figure out how to use it