lprevost
Contributor III

The only thing that has worked for me consistently in python is 

params = dbutils.widgets.getAll() where an empty dictionary is returned if I'm in interactive mode and the job/task params are returned if they are present.