wxWidgets/wxPython/demo/data/echo.py
Robin Dunn 1e7ecb7be0 Massive code changes and cleanup to allow wxPython to be split into
multiple extension modules again.  A Python CObject is used to allow
the "export" of SWIG and other common helper functions from the wxc
module to other modules, even if they are in separate shared
libraries.  Should also be usable from 3rd party code, just include
wxPython/src/export.h

Changed the default setup so the following are built as separate
extension modules:  calendar, glcanvas, grid, html, ogl, stc, and
utils.  Will probably add more later.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-12-22 00:06:04 +00:00

30 lines
719 B
Python

"""
This is a simple little echo program that is used by the wxProcess
demo. It reads lines from stdin and echos them back to stdout, until
there is an EOF on stdin.
Enter text in the field below to send to the stdin of the echo
process. Clicking on 'Close Stream' will close the stream in the
demo, and then echo.py should terminate too...
"""
import sys
sys.stdout.write( __doc__)
sys.stdout.flush()
line = sys.stdin.readline()
while line:
line = line[:-1]
sys.stdout.write('\nYou typed "%s"\n' % line)
sys.stdout.flush()
#sys.stderr.write('\nTyped you "%s" Yoda say...\n' % line)
#sys.stderr.flush()
line = sys.stdin.readline()
sys.stdout.write('\nExiting...\n')
sys.stdout.flush()