Passing data from a plugin back to python


I’ve written a plugin and a python script that uses pyimagej to call it.
the plugin displays some graphs and whatnot, but I also need it to return some data back to the python script (a digest/meta-data in the form of an array or an integer [if an array is not possible]).
Is that possible from within the pyimagej library? or must I use external means? (files, etc…)