> I am trying to build a simple text editor which has a couple of
> options of
> editing, displaying and saving the file.
Are you using a GUI or console?
The solution is potentially quite different depending on the choice.
> Now what I want to do is to allow teh user to keep entering the text
> unless
> he pressed ':q'.
How are you reading the characters in the first place?
if you can find a way to read characters from the keyboard
one at a time then
while True
ch = getchar()
if ch ==':'
ch = getchar()
if ch == 'q': break
Will work.
So the question becomers do you know how to write getchar()?
Alan G.
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor