ProtoPEP: A Standardized Marker for Mirroring the TTY to Other Devices

I received this proposal from an interested party and am passing it along for consideration. I am concerned about a conflict of interest as the author has ties to the paper industry, and thus could stand to benefit financially from the proposal, but am willing to give them the benefit of the doubt. -eric #################################### PEP: 4XX Title: A Standardized Marker for Mirroring the TTY to Other Devices Version: $Revision$ Last-Modified: $Date$ Author: Michael G. Scott <michael at dundermifflin.com> BDFL-Delegate: Barry Warsaw Status: Draft Type: Standards Track Content-Type: text/plain Created: 01-Apr-2013 Post-History: Abstract The history of computing offers a progression of text I/O devices, most notably the Teletype machine [1]. This device had such an impact that we still identify our terminals by "TTY". Presently the terminal text I/O in Python is facilitated through sys.stdin/stdout/stderr. This is a proposal to facilitate mirroring the data passing across these three objects to another device on the system such as a printer. The API to the do so would be through a new builtins special name: __mifflin__. Rationale Dumping the TTY to a printer is a natural desire for anyone who knows anything about computer history and an unrecognized longing for everyone else. Though perhaps no one remembers it this way, there was a strong outcry to the introduction of monitors and keyboards as a replacement for the teletype machine. Everyone loved the teletype. The lamentable fact that monitors and keyboards won out is due to the efforts of the monitor-and-keyboard lobby and particularly to the pathological (but successfully concealed) fear of teletypes of one Thomas Watson, Jr. [2]. Why did people love the teletype? Hard copies are much more endearing. Consider how lame e-books are. A monitor will never give you that fresh ink smell, that textured feel of paper in your hands. You can't make an airplane out of a kindle or wad up your monitor into a ball and throw it into a trash can. People try to accomplish the teletype's satisfying audible response to each keystroke with fancy "retro" keyboards, but they will never be satisfied until they hear the original. Furthermore, look to the airline industry, a paragon of stability and consistency. In critical situations they mirror their TTYs to printers. This is because the hard copies are perfect for chronological review, documentation, and reliable backup. If it's good enough for them, it should be good enough for us. Usage Much as you would with __import__, you will bind builtins.__mifflin__ to a Printer object (see below). By default __mifflin__ will be set to sys.printer (see below). io.Printer and sys.printer A new type will be added to the io module called Printer. Printer may be initialized with a file-like object that exposes an underlying printer device (by default the system printer). Printer will have a write() method that takes a string and writes it out to the underlying system printer. A new attribute will be added to the sys module named "printer". sys.printer will be a Printer object, with a default of a wrapper around the system printer. References [1] http://en.wikipedia.org/wiki/Tty_(Unix) [2] https://en.wikipedia.org/wiki/Thomas_Watson,_Jr. Copyright This document has been placed in the public domain. Local Variables: mode: indented-text indent-tabs-mode: nil sentence-end-double-space: t fill-column: 70 coding: utf-8

On Tue, Apr 2, 2013 at 5:17 AM, Eric Snow <ericsnowcurrently@gmail.com> wrote:
The history of computing offers a progression of text I/O devices, most notably the Teletype machine [1]. This device had such an impact that we still identify our terminals by "TTY". Presently the terminal text I/O in Python is facilitated through sys.stdin/stdout/stderr. This is a proposal to facilitate mirroring the data passing across these three objects to another device on the system such as a printer. The API to the do so would be through a new builtins special name: __mifflin__.
This would vastly improve the grokkability of Python. Currently, the most fundamental operation in programming is sadly misnamed: print("Hello, world!") When this PEP is accepted, as it most surely should be, the print function will actually send content to a printer. I have seen a number of people[1] extremely confused and even put off programming by the way in which the "print" command does not print, just as in REXX the "say" command does not produce sound. Finally this terrible lack will be cured, once and for all. [1] The fine print down the bottom reminds you that zero is a number. ChrisA

In AppleScript, "print" is part of the Standard Suite of methods that every object is supposed to handle, and it actually means "print". Sent from a random iPhone On Apr 1, 2013, at 12:11, Chris Angelico <rosuav@gmail.com> wrote:
On Tue, Apr 2, 2013 at 5:17 AM, Eric Snow <ericsnowcurrently@gmail.com> wrote:
The history of computing offers a progression of text I/O devices, most notably the Teletype machine [1]. This device had such an impact that we still identify our terminals by "TTY". Presently the terminal text I/O in Python is facilitated through sys.stdin/stdout/stderr. This is a proposal to facilitate mirroring the data passing across these three objects to another device on the system such as a printer. The API to the do so would be through a new builtins special name: __mifflin__.
This would vastly improve the grokkability of Python. Currently, the most fundamental operation in programming is sadly misnamed:
print("Hello, world!")
When this PEP is accepted, as it most surely should be, the print function will actually send content to a printer. I have seen a number of people[1] extremely confused and even put off programming by the way in which the "print" command does not print, just as in REXX the "say" command does not produce sound. Finally this terrible lack will be cured, once and for all.
[1] The fine print down the bottom reminds you that zero is a number.
ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org http://mail.python.org/mailman/listinfo/python-ideas
participants (3)
-
Andrew Barnert
-
Chris Angelico
-
Eric Snow