Line graphics on Linux console

frank_at_chagford.com
Date: 01/29/05


Date: 29 Jan 2005 08:03:45 -0800

Hi all

I don't think this is strictly a Python problem, but as it manifests
itself in one of my Python programs, I am hoping that somebody in this
group can help me.

The following is a message I sent to co.os.linux.setup -

"My question concerns line graphics on a text-based console. ­My
actual problem relates to a [Python] program I have written using
ncurses, b­ut you can easily test it by running a program like
minicom.

If you call up the minicom menu, it should be surrounded by ­a nice
box made up of horizontal and vertical lines, corners, etc. It used to
work up until Redhat 7. Since upgrading to Redhat 9, and now Fedo­ra,
it (and my program) has stopped working."

I received the following reply from Thomas Dickey -

"That's because Redhat uses UTF-8 locales, and the Linux cons­ole
ignores vt100 line-drawing when it is set for UTF-8. (screen also
d­oes this).
ncurses checks for $TERM containing "linux" or "screen" (sin­ce
there's no better clues for the breakage) when the encoding is UTF-8­,
and doesn't try to use those escapes (so you would get +'s and -'s).
co­mpiling/linking with libncursesw would get the lines back for a
properly-wri­tten program."

I don't really understand the last sentence. Does anyone know if it is
possible to do this (or anything else) or am I stuck.
TIA for any advice.

Frank Millman



Relevant Pages

  • Re: upgrading python/redhat
    ... scripts that redhat included -- things that deal with the printer ... setup. ... you may want to grab python and install from source into something ...
    (RedHat)
  • Re: Comparing perfs of two python interpreters on the same Linux machine (for Zope)
    ... > install a Python 2.3.4 that I have compiled myself. ... > python interpreter and that of the Python provided by RedHat ... in the calls to cc and ln while compiling python). ...
    (comp.lang.python)
  • Problem building Python 2.3.4 on RedHat Enterprise; tcl not found
    ... I'm trying to build Python 2.3.4 from source on a RedHat Enterprise ... Having gone through the make in one case and gotten no _tkinter, ...
    (comp.lang.python)
  • Re: Problem building Python 2.3.4 on RedHat Enterprise; tcl not found
    ... Russell E. Owen wrote: ... > I'm trying to build Python 2.3.4 from source on a RedHat Enterprise ... > All of these result in the ominous message (even the last form, ...
    (comp.lang.python)
  • Re: Re. suid/sudo in python
    ... I don't think this is necessary a python problem but a generic, SUID scripts considered dangerous, problem. ... If you are particular adventurous, your cronjob could check if a certain file exists first and then execute the script, this is especially handy when you expect changes every second or so. ... I wouldn't write that check for file existence in Python though, you don't want to fire up an interpreter every second. ...
    (comp.lang.python)