How to access statusbar from text editor run script?

I’m making obj sequence importing script. As import takes considerable time and most often people forget to open system console beforehand, and after running the script it’s too late I began to wonder on:
How to access progress bar and info in statusbar from text editor run script?

there is no (proper) way of doing this, progress bar is only available for C-code and won’t show in Info area if run from text editor.

The only way I see is to have an import operator + an operator with timer events to change Area.header_text_set every x seconds until import has finished. It would require a property at scene level to access current progress of the import from that timer callback op, and the import op would have to update that property regularly…

I’d rather use print() and maybe try to improve import script performance itself.

Well, the import script works as fast as obj import works, which imho is quite good (the data volume is considerable).
A shame. I’m not familiar with Blender internals, but it seem it should be a trivial thing to implement. Especially considering, how many add-ons could benefit from it. Could it be doable by newbie to blender architecture?

There already exists an interface for render engines.


You can make your AddOn an always on render engine and map your panels to where ever you like. Then you can pass around the engine struct internally and make updates to the status area whenever you like.

But a more practical way to access the status area would be nice too.