]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/data/echo.py
changed Mac Mouse Moved Hysteresis (area in which mouse movements do NOT generate...
[wxWidgets.git] / wxPython / demo / data / echo.py
1
2
3 """
4 This is a simple little echo program that is used by the wxProcess
5 demo. It reads lines from stdin and echos them back to stdout, until
6 there is an EOF on stdin.
7
8 Enter text in the field below to send to the stdin of the echo
9 process. Clicking on 'Close Stream' will close the stream in the
10 demo, and then echo.py should terminate too...
11 """
12
13 import sys
14
15 sys.stdout.write( __doc__)
16 sys.stdout.flush()
17
18 line = sys.stdin.readline()
19 while 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
28 sys.stdout.write('\nExiting...\n')
29 sys.stdout.flush()