Edit Font object from command line (Py.noobie)

I’m just starting a new project that has required me to dive into the API. Is there a command that can edit the text of a text object? I’ve only gotten as far as changing the object name and material color, but I’d like to be able to enter a string and have it show up in the 3D view.

Maybe a way around this would be a command to enter edit mode (if that exists) then contextually enter the string. I’ve searched all around blender.org’s documentation but I can’t seem to find anything that works.

One can only go so far relying on the tooltips! If it sounds like I don’t know what I’m talking about, that’s because I don’t! :o


You can do it with operators while in edit mode, like:

bpy.ops.font.delete(type="ALL") # Clear all the text
bpy.ops.font.text_insert(text="Hello") # Insert 'Hello'


Many thanks!