Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38608
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <vnigtha@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'example:': 0.03; 'initialize': 0.05; 'exception.': 0.07; 'newline': 0.07; 'raises': 0.07; 'cursor': 0.09; 'exception,': 0.09; 'option:': 0.09; 'subject:Python3': 0.09; 'terry': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'ignore': 0.13; 'curses': 0.16; 'disabled.': 0.16; 'reedy': 0.16; 'try/except': 0.16; 'wrote:': 0.17; 'fix': 0.17; 'char': 0.17; 'module,': 0.17; 'script.': 0.17; 'jan': 0.18; 'otherwise,': 0.20; 'skip:\xd1 10': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'tried': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'character': 0.29; 'position.': 0.30; 'problem.': 0.32; 'getting': 0.33; 'skip:s 30': 0.33; 'scroll': 0.33; 'skip:\xd0 10': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'text': 0.34; 'screen': 0.34; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'test': 0.36; 'thank': 0.36; 'problems': 0.36; 'possible': 0.37; 'beyond': 0.37; 'being': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'possible.': 0.38; 'instead': 0.39; 'where': 0.40; 'you.': 0.61; 'movement': 0.62; 'strange': 0.62; 'behavior': 0.64; 'here': 0.65; '8bit%:100': 0.70; 'moves': 0.84; 'why?': 0.84 |
| X-Received | by 10.49.75.195 with SMTP id e3mr848037qew.24.1360533960308; Sun, 10 Feb 2013 14:06:00 -0800 (PST) |
| Newsgroups | comp.lang.python |
| Date | Sun, 10 Feb 2013 14:06:00 -0800 (PST) |
| In-Reply-To | <mailman.1560.1360437812.2939.python-list@python.org> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=94.143.44.204; posting-account=HJeeUwoAAACqQZf2_3yuey8U4o2rTRn3 |
| References | <3adc871c-9a35-42ea-9687-52413d72a918@googlegroups.com> <mailman.1560.1360437812.2939.python-list@python.org> |
| User-Agent | G2/1.0 |
| X-Google-Web-Client | true |
| X-Google-IP | 94.143.44.204 |
| MIME-Version | 1.0 |
| Subject | Re: Python3 curses behavior |
| From | Vlasov Vitaly <vnigtha@gmail.com> |
| To | comp.lang.python@googlegroups.com |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Message-ID | <mailman.1605.1360533970.2939.python-list@python.org> (permalink) |
| Lines | 77 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1360533970 news.xs4all.nl 6922 [2001:888:2000:d::a6]:39612 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:38608 |
Show key headers only | View raw
суббота, 9 февраля 2013 г., 23:22:47 UTC+4 пользователь Terry Reedy написал: > On 2/9/2013 6:23 AM, Vlasov Vitaly wrote: > > > Hello. > > > > > > I found strange behavior of curses module, that i can't understand. I > > > initialize screen with curses.initscr(), then i create subwin of > > > screen with screen.subwin(my_subwin_sizes). After that i fill subwin > > > with my_char in for-loop. On last char in last line subwin.addch() > > > raises exception. > > > > I have never used curses but I have used text screens. I suspect that > > addch moves the cursor to the position beyond where the character is > > added, but there is no such position. I remember having problems writing > > to the last char of a 24x80 screen without getting either a scroll or > > beep if scrolling was disabled. > > > > > This is my problem. Why? How to fix it? > > > > Perhaps this will help: > > window.leaveok(yes) > > If yes is 1, cursor is left where it is on update, instead of being at > > “cursor position.” This reduces cursor movement where possible. If > > possible the cursor will be made invisible. > > > > > (If i will ignore exception, then last char will be displayed) > > > > Otherwise, just catch the exception, as you already discovered. > > > > > Here simple example: http://pastebin.com/SjyMsHZB > > > > -- > > Terry Jan Reedy Thank you. I tried everything in my test script. win.leaveok() - no effect curses.cur_vis() - no effect win.scrollok() - start newline and place cursor on it It's only one last option: on last line last char try/except with pass.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Python3 curses behavior Vlasov Vitaly <vnigtha@gmail.com> - 2013-02-09 03:23 -0800
Re: Python3 curses behavior Chris Angelico <rosuav@gmail.com> - 2013-02-09 22:28 +1100
Re: Python3 curses behavior Vlasov Vitaly <vnigtha@gmail.com> - 2013-02-09 04:38 -0800
Re: Python3 curses behavior Vlasov Vitaly <vnigtha@gmail.com> - 2013-02-09 04:38 -0800
Re: Python3 curses behavior Terry Reedy <tjreedy@udel.edu> - 2013-02-09 14:22 -0500
Re: Python3 curses behavior Vlasov Vitaly <vnigtha@gmail.com> - 2013-02-10 14:06 -0800
Re: Python3 curses behavior Dan Stromberg <drsalists@gmail.com> - 2013-02-11 15:53 -0800
Re: Python3 curses behavior Vlasov Vitaly <vnigtha@gmail.com> - 2013-02-10 14:06 -0800
csiph-web