in reply to need suggestions in implementing command prompt
Maybe you can use this: TkCon as an application console, and also see this: Adding a Safe Interactive Intrepreter to an Application.