Backstory: I have a couple of .blend files that share a single python plugin that provides a custom operator that renders them. I also have a wrapper script that I run blender with that calls that operator, like this:
# wrapper.py import bpy bpy.ops.render.my_custom_render_operator()
then execute blender like this:
blender "$1.blend" --background --python wrapper.py
Each .blend file has the python plugin as an external text block that is automatically registered on startup.
My problem that when I edit the plugin file blender don't update it's copy. If I were opening the GUI I would would open the text block and go to Text->Reload (or ALT-R), but I can't do that when rendering from the command line.
I need a way to reload all the text blocks from python, so I could put that in
wrapper.py before calling my operator. I couldn't find a function to do that, although
bpy.ops.text.resolve_confit() looks close.