X Tutup
The Wayback Machine - https://web.archive.org/web/20241214175912/https://github.com/python/cpython/issues/45165
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curses - new window methods: addchstr and addchnstr #45165

Open
wmula mannequin opened this issue Jul 10, 2007 · 5 comments
Open

curses - new window methods: addchstr and addchnstr #45165

wmula mannequin opened this issue Jul 10, 2007 · 5 comments
Assignees
Labels
3.7 (EOL) end of life extension-modules C modules in the Modules dir type-feature A feature request or enhancement

Comments

@wmula
Copy link
Mannequin

wmula mannequin commented Jul 10, 2007

BPO 1751519
Nosy @serhiy-storchaka
Files
  • _cursesmodule.diff: patch
  • test_addchstr.py: simple addchstr test
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/serhiy-storchaka'
    closed_at = None
    created_at = <Date 2007-07-10.22:48:41.000>
    labels = ['extension-modules', 'type-feature', '3.7']
    title = 'curses - new window methods: addchstr and addchnstr'
    updated_at = <Date 2017-11-01.18:52:54.580>
    user = 'https://bugs.python.org/wmula'

    bugs.python.org fields:

    activity = <Date 2017-11-01.18:52:54.580>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = False
    closed_date = None
    closer = None
    components = ['Extension Modules']
    creation = <Date 2007-07-10.22:48:41.000>
    creator = 'wmula'
    dependencies = []
    files = ['8077', '8078']
    hgrepos = []
    issue_num = 1751519
    keywords = ['patch']
    message_count = 5.0
    messages = ['52824', '52825', '60240', '116703', '297631']
    nosy_count = 3.0
    nosy_names = ['wmula', 'serhiy.storchaka', 'vegard']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue1751519'
    versions = ['Python 3.7']

    @wmula
    Copy link
    Mannequin Author

    wmula mannequin commented Jul 10, 2007

    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.

    @wmula wmula mannequin added extension-modules C modules in the Modules dir labels Jul 10, 2007
    @wmula
    Copy link
    Mannequin Author

    wmula mannequin commented Jul 10, 2007

    File Added: test_addchstr.py

    @akuchling
    Copy link
    Member

    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.

    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Sep 17, 2010

    Doc additions haven't been included with the patches.

    @BreamoreBoy BreamoreBoy mannequin added type-feature A feature request or enhancement labels Sep 17, 2010
    @vegard
    Copy link
    Mannequin

    vegard mannequin commented Jul 4, 2017

    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.

    @serhiy-storchaka serhiy-storchaka added 3.7 (EOL) end of life labels Nov 1, 2017
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @erlend-aasland erlend-aasland moved this to Features in Curses issues May 20, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life extension-modules C modules in the Modules dir type-feature A feature request or enhancement
    Projects
    Status: Features
    Development

    No branches or pull requests

    2 participants
    X Tutup