Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92325 > unrolled thread

Re: Query regarding sys.stdout.write

Started byChris Angelico <rosuav@gmail.com>
First post2015-06-08 13:19 +1000
Last post2015-06-08 13:19 +1000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Query regarding sys.stdout.write Chris Angelico <rosuav@gmail.com> - 2015-06-08 13:19 +1000

#92325 — Re: Query regarding sys.stdout.write

FromChris Angelico <rosuav@gmail.com>
Date2015-06-08 13:19 +1000
SubjectRe: Query regarding sys.stdout.write
Message-ID<mailman.289.1433733572.13271.python-list@python.org>
On Mon, Jun 8, 2015 at 11:56 AM, Cameron Simpson <cs@zip.com.au> wrote:
> If you want do do this version portably, hook into the Python curses module
> and get the result of curses.tigetstr('el'). If that returns None, the
> terminal does not support clear-to-end-of-line and you should use the
> spaces-overwrite technique. But if it returns a string, you can write that
> string, whatever it is, to erase to the end of the line.
>
> Most modern terminals are ANSI supersets, but the terminfo database has a
> huge suite of descriptions of terminals, and this will get your the right
> sequence, whatever that may be, for your current terminal.

Fair point. I hard-coded it in LetMeKnow because I didn't know of a
way to access terminfo in Python; thanks for the tip. Although...

> Of course, reaching for the curses module is massive overkill in a sense,
> but it is the only way to consult terminfo in the Python stdlib.

... yeah, massive overkill.

> But I have to say, I "non-concur." (Non-concur was a term I learned at
> IBM. IBM seemed to be a breeding ground for making up words and
> phrases, turning verbs into nouns, etc. "Non-concur" seems to be for
> those times when saying "I disagree" just isn't strong enough!)
>        - Robert D. Seidman <robert@clark.net>

Heh. That is so true. My favourite piece of IBM-speak comes from the
OS/2 config.sys directive "REIPL=C", which causes fatal errors to be
logged to C:\POPUPLOG.OS2 ... of course.

http://rosuav.blogspot.com.au/2011/01/reiplophobia.html

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web