text editor written in python