How to run the dialog in a Python plugin

In the general case, you can’t… the Python plugins cannot act on the UI. There are some cases where a function can be asked to pop out an interactive dialog (with a named parameter: function(arg1,arg2,run_mode=RUN_INTERACTIVE)) but this doesn’t apply to the API that are behind Curves/Levels.