I would need an in-game code editor for having the player write python code. Is it possible to use godot editor components for this? If yes, how? Important features would be syntax highlighting and indentation. Suggestions are appreciated.
Here is how the definition of the code editor component: https://github.com/godotengine/godot/blob/master/editor/code_editor.h
I found no evidence for scripting bindings to it though. So you could try to write an engine plugin to use the built-in editor. But I think it will probably be easier to implement the highlighting and indentation logic yourself. I'm afraid this is a task at which Godot does not especially shine.
I also thought about using one of the many JS highlighting frameworks and it really is a shame that we have no way to build some UI portions of our Godot games with web technologies, but it really seems undoable at the moment: https://www.reddit.com/r/godot/comments/73829a/how_might_one_render_web_pages_in_a_godot_game/
EDIT: If you need to include a python runtime anyway, maybe you can use http://pygments.org/ ?
Thanks for the suggestions. Since I also need off-screen rendering, I might go with C++ QtSyntaxHighlighter and gdnative. Too complicated for my liking but unfortunately don't see any other option yet.