here is the code:
from Tkinter import * class Main(object): def __init__(self): self.console = Text(root, relief='groove', cursor='arrow', spacing1=3) self.console.insert(INSERT, '>>> ') self.console.focus_set() self.scroll = Scrollbar(root, cursor='arrow', command=self.console.yview) self.console.configure(yscrollcommand=self.scroll.set) self.scroll.pack(fill='y', side='right') self.console.pack(expand=True, fill='both') root = Tk() root.geometry('%sx%s+%s+%s' %(660, 400, 40, 40)) root.option_add('*font', ('Courier', 9, 'bold')) root.resizable(0, 1) app = Main() root.mainloop()
Is there any way to make "โ>" unrecoverable (for example, in IDLE)? thanks in advance.
source share