This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: curses - new window methods: addchstr and addchnstr
Type: enhancement Stage: patch review
Components: Extension Modules Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: serhiy.storchaka, vegard, wmula
Priority: normal Keywords: patch

Created on 2007-07-10 22:48 by wmula, last changed 2022-04-11 14:56 by admin.

Files
File name Uploaded Description Edit
_cursesmodule.diff wmula, 2007-07-10 22:48 patch
test_addchstr.py wmula, 2007-07-10 22:52 simple addchstr test
Messages (5)
msg52824 - (view) Author: Wojciech Mula (wmula) Date: 2007-07-10 22:48
This patch add two window methods: addchstr and addchnstr and also module attribute chtype_size.  Methods use addstr convention i.e. calling with/without new cursors coords is allowed.

Methods accept any buffer-object (string, array, ctypes string buffer) of length n*chtype_size.
msg52825 - (view) Author: Wojciech Mula (wmula) Date: 2007-07-10 22:52
File Added: test_addchstr.py
msg60240 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2008-01-19 22:42
I'm doubtful about passing strings of characters that contain characters
+ attrs.  The usual convention used by the curses module is to allow
strings containing attributeless characters to display, or integers that
can include an attribute value.

Perhaps these functions can take an iterable containing either
1-character strings or integers, and assemble them into a C-level array.
msg116703 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-09-17 18:23
Doc additions haven't been included with the patches.
msg297631 - (view) Author: Vegard (vegard) Date: 2017-07-04 09:24
Bump, I just found out addchstr() is unsupported, which is unfortunate as there doesn't seem to be any other easy way to prevent line wrapping if you submit too long strings to addstr() without keeping track of the x location and/or the string length by hand.
History
Date User Action Args
2022-04-11 14:56:25adminsetgithub: 45165
2017-11-01 18:52:54serhiy.storchakasetversions: + Python 3.7, - Python 3.2
2017-11-01 18:51:18serhiy.storchakasetassignee: serhiy.storchaka

nosy: + serhiy.storchaka
2017-07-04 09:24:31vegardsetnosy: + vegard
messages: + msg297631
2014-12-31 16:20:52akuchlingsetnosy: - akuchling
2014-02-03 19:40:01BreamoreBoysetnosy: - BreamoreBoy
2010-11-12 21:00:10akuchlingsetassignee: akuchling -> (no value)
2010-09-17 18:23:14BreamoreBoysetversions: + Python 3.2
nosy: + BreamoreBoy

messages: + msg116703

type: enhancement
stage: patch review
2008-01-19 22:42:12akuchlingsetmessages: + msg60240
2008-01-12 01:15:52akuchlingsetassignee: akuchling
nosy: + akuchling
2007-07-10 22:48:41wmulacreate