This is an excerpt from a source file of wxPython:
"""
Create the output window if needed and write the string to it.
If not called in the context of the gui thread then uses
CallAfter to do the work there.
"""
How does this work internally? Why is it important that GUI related calls are not made by other threads directly?
Do you know of a chart or something that explains such GUI concepts in a short, simple way?
I would love, if I not had to read a novel to understand this issue so that I know how to choose my design.
Edit:
This is for a discussion below:

That’s pretty easy. Think of a queue, wxPython has it’s own internal Event-Queue, you cause wxPython to process it when calling MainLoop on your
app, which will be called from the Main-Thread. So as whenever you modify a widget it will not interfere with the MainLoop which is processing the Event-Queue. But when you add Threads, more then one Thread is manipulating the GUI and/or the Event-Queue and GUI-access is not synchronized.That’s where wx.CallAfter gets useful, it simply adds an pseudo-event to the Event-Queue, which will call your specified function, so it will be executed from the Main-Thread and just one Thread is accessing the GUI. Note, when your passed function takes a while to return the GUI will freeze, because no more events (like movement or clicks) are processed.
Related: http://wiki.wxpython.org/LongRunningTasks