[Edu-sig] interactive vs compiled from file
Dethe Elza
delza at livingcode.org
Fri Aug 3 23:17:50 CEST 2007
On 3-Aug-07, at 11:17 AM, Michael Tobis wrote:
> 2) Would it be difficult to provide an alternative interpreter that
> produced nothing unless you asked it to print? Would this be a good
> idea?
>>> 'abc'
'abc'
>>> import sys
>>> def f(value): pass
...
>>> sys.displayhook = f
>>> 'abc'
>>>
So if you add a do-nothing displayhook in your site.py, or as part of
a standard local import, you won't have the echo behaviour.
HTH
--Dethe
"It goes against the grain of modern education to teach children to
program. What fun is there in making plans, acquiring discipline in
organizing thoughts, devoting attention to detail and learning to be
self-critical?" --Alan Perlis
More information about the Edu-sig
mailing list