pyclibrary
pyclibrary copied to clipboard
Permit module reuse, remove init function
We have many Python modules that makes use of pyclibrary. Only one is allowed to call pyclibrary.init(). This issue is about removing the init() method and instead move its parameters to each CParser instance, to allow several uses of pyclibrary in one Python interpreter.
Thanks for reaching out.
My bandwidth for this project is extremely limited. If you can make a PR I will review it under the best delay but I won't have time to at this myself.
I took a sunday afternoon to try to come up with a PR but got stuck in how nestled the global variables are. Even class Type is not the same in two configurations. The cache will incorrectly be reused in a different init configuration. The metaclass used for pluggable backends is hindering... I would probably make a PR to revert pluggable backends first.