Message240877
The original problem was described as:
"the character is printed at the start of the current line rather than the start of the next line."
I haven't gotten too far investigating the cause, but adding a single line to the sample code makes this test code a bit easier to use. Without a pause at the end of execution, my terminal immediately clears the screen making it impossible to see the output.
#! /usr/bin/python
import locale
locale.setlocale(locale.LC_ALL, '')
code = locale.getpreferredencoding()
import curses
def main(stdscr):
stdscr.erase()
stdscr.move(0, 0)
for i in range(0,stdscr.getmaxyx()[1] - 1):
stdscr.addstr(".");
stdscr.addstr(u"\u3007\u3007".encode(code));
stdscr.refresh()
c = stdscr.getch() # the new line
curses.wrapper(main)
Tested and reproduced on the following platforms:
1.
* XTerm(309) (NOTE: You must run `export LC_ALL=en_US.UTF-8` before non-ascii encodings will work at all in xterm)
* XQuartz 2.7.7
* Mac OS X 10.10.1
2.
* iTerm2 1.0.0.20130622
* Mac OS X 10.10.1
With each of the following python versions:
* 2.7.9
* 3.4.3
* Latest 'default' branch |
|
Date |
User |
Action |
Args |
2015-04-14 13:10:25 | cabiad | set | recipients:
+ cabiad, vstinner, ezio.melotti, fugounashi |
2015-04-14 13:10:25 | cabiad | set | messageid: <1429017025.08.0.544072301167.issue6733@psf.upfronthosting.co.za> |
2015-04-14 13:10:25 | cabiad | link | issue6733 messages |
2015-04-14 13:10:24 | cabiad | create | |
|