While this question has a python backend, the question is not tied to python itself, but rather about extension mechanisms and how to register/lookup for plugin
as one of possible ideas, you can look at OSGi concept, that is used for plugin system management of Eclipse. It could be overkill for your specific case, but definitely the source of inspiration.
As you started out speaking about programming language implementation / processing, it may be worth noting that recently gcc acquired plugin capabilities too.