The attached patch, when applied after my earlier Python 3 patches, gets more of my scripts (and C API stuff) working with Python 3.
View entire thread