HI, guys,
I am using wxpython to develop a GUI for software configuration, launching and interaction. I want something like a CLI shell window (like pycrust) embedded inside the GUI to interact with a long-term running background process. I could give the input via this shell window and print the output on this window. My current code works very well. But there is problem of editing style, because wx.TextCtrl is simply an editable text window. e.g., I could overwrite or remove any previous text characters or type new input at any location. This is not desirable. 
How can I make the wx.TextCtrl like a shell window, i.e. make the output readonly, while keep input editable? e.g.,
1) when input new command, the position only starts after prompt. 
2) The user cannot change or replace any previous output text.
I want to force certain restriction, for interaction purpose. 
Is there a way to fix the curse prompt? If so, then my problem will be solved, because the user will have no chance to move the curse. 
Or is there a way to set certain part of the text (the output and the prompt) readonly?
Or another solution, thanks to 9000's answer, is that I make a grid of windows (a StaticTextCtrl or readonly TextCtrl for output in the upper window; prompt ">>>" on the bottom left area; invisible-border editable window or entry dialog on the bottom right area for input). 
any suggestions? Is there any better choice?
Thanks a lot!
Just keep track of the location of the prompt each time you display it. Intercept all keypresses and releases, and if anything causes text before the prompt to change, veto that event. It's not that hard, it just takes a little attention to detail and some diligence to capture all text-modification events.
output readonly, input editable with wx.textctrl?