]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/demo/data/echo.py
don't try to refresh the menu bar before showing it, fixes crash on startup with...
[wxWidgets.git] / wxPython / demo / data / echo.py
... / ...
CommitLineData
1
2
3"""
4This is a simple little echo program that is used by the wxProcess
5demo. It reads lines from stdin and echos them back to stdout, until
6there is an EOF on stdin.
7
8Enter text in the field below to send to the stdin of the echo
9process. Clicking on 'Close Stream' will close the stream in the
10demo, and then echo.py should terminate too...
11"""
12
13import sys
14
15sys.stdout.write( __doc__)
16sys.stdout.flush()
17
18line = sys.stdin.readline()
19while line:
20 line = line[:-1]
21 sys.stdout.write('\nYou typed "%s"\n' % line)
22 sys.stdout.flush()
23 #sys.stderr.write('\nTyped you "%s" Yoda say...\n' % line)
24 #sys.stderr.flush()
25 line = sys.stdin.readline()
26
27
28sys.stdout.write('\nExiting...\n')
29sys.stdout.flush()