Python: What are some ways to make data available for plugins?

I implement a simple plug-in structure for a small Python program and wonder what different existing methods are for transferring data to plugins.

At this point, I see two alternatives:

  • transfer data that depends on a specific task to the plug-ins, do not provide plug-ins with access to other data
  • transfer all data to which any plugin should have access.

What are the pros and cons of these two approaches? Are there other ways or best practices that I don't know about? What should I consider when choosing a path?

Note: I ask for examples and general advice.

+3
source share
1

, wxPython . , , , , API .

, wxMouseEvent x y. ( ) GetEventObject ( GetParent....)

+1

Source: https://habr.com/ru/post/1762145/


All Articles