ltermio


Nameltermio JSON
Version 0.6.3 PyPI version JSON
download
home_page
SummaryA lightweight POSIX terminal I/O library
upload_time2024-01-01 01:30:34
maintainer
docs_urlNone
author
requires_python>=3.7
licenseApache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
keywords ansi color color256 colour composing csi curses cursor getch keyboard ltermio mouse posix terminal termios termkey termouse xfree86 xterm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ltermio - A Lightweight POSIX terminal I/O library

The package contains 5 modules: ***cursor***, ***termkey***, ***termouse***, ***color256*** and ***unicon***. Tested only on **MacOS terminal** and **iTerm2**, so the platform compatibility has not been well verfied yet.  
All functions are based on **XTerm** specification, **CSI** sequences and **termios**, no additional requirements other than the standard library.

**Applicability**: They are only for **POSIX** terminal applications.

References:  
<https://en.wikipedia.org/wiki/ANSI_escape_code>  
<https://invisible-island.net/xterm/ctlseqs/ctlseqs.html>  
<https://www.xfree86.org/current/ctlseqs.html>

## Installation & Usage
Uses pip to install the package:

`pip3 install ltermio`

More details on module usage:

`pydoc ltermio.module-name`

## History & Why
As we all know, character terminal are outdated facilities, why did I still write such a package?

When I was learning **Python** a few months ago, I decided to write a terminal **Tetris** game as a practice of the language learning. Due to the learning reason, I did not want to use any third-party packages. So when I finally finished the game, there naturally formed this by-product.

## color256 module
Sets 256-color display attributes of character terminal.

There are three pairs of functions to set or restore colors according to their literal name, and another pair to set text display attributes:

```python
    set_fcolor(color: int)
    reset_fcolor()
    set_bcolor(color: int)
    reset_bcolor()
    set_color(fcolor: int, bcolor: int)
    reset_color()
    set_textattr(attr: TextAttr | int)
    reset_textattr(attr: TextAttr | int)
```

All color functions use indexed color as parameter, function *rgb()* can make indexed color number from given RGB parameters. Enum class *Color* defined constants of some common-used indexed colors and grayscales.

Enum class *TextAttr* defined constants of text display attributes, like *BOLD*, *ITALIC* and *UNERLINED*, etc.

Following sample code prints gradually bright colorful greetings:

```python
    from ltermio import set_fcolor, reset_fcolor

    for i in range(6):
        for char in 'Hello, color256!':
            set_fcolor(ord(char) % 32 + 20 + i * 36)
            print(char, end='')
        print()
    reset_fcolor()
```

Another sample to output all colors:

```python
    from ltermio import rgb, set_bcolor, reset_bcolor

    for red in range(6):
        for green in range(6):
            for blue in range(6):
                set_bcolor(rgb(red, green, blue))
                print('  ', end='')
        print()
    reset_bcolor()
```

## cursor module
Wrapper functions of the **CSI(Control Sequence Introducer)** sequences about cursor and screen.

A several of additional functions are provided for text composing:

```python
    v_composing(seq: str) -> str
    downward_seq(text: str, cols: int) -> str
    vert_seq(text: str) -> str
    rect_border_seq(width: int, height: int, sym: str) -> str
```

Following sample code of *v_composing()* displays three big colorful greetings:

```python
    from ltermio import putmsg, v_composing

    _P1 = ':{0}\x1b3hj'
    _P15 = ':{0}\x1b6l:{0}\x1b11hj'
    _DASH = '5:{0}\x1b11hj'
    _NEXT_POS = '5k17l'

    LETTERS = {
        'E': v_composing(f'{(_DASH + _P1) * 2}{_DASH}{_NEXT_POS}'),
        'H': v_composing(f'{_P15 * 2}{_DASH}{_P15 * 2}{_NEXT_POS}'),
        'L': v_composing(f'{_P1 * 4}{_DASH}{_NEXT_POS}'),
        'O': v_composing(f'{_DASH}{_P15 * 3}{_DASH}'),
    }

    greeting = ''.join(map(LETTERS.get, 'HELLO'))
    putmsg(3, 20, greeting.format('\u2b50'))
    putmsg(9, 14, greeting.format('\u2b55'))
    putmsg(15, 8, greeting.format('\U0001f7e2'))
    print('\n')
```

## termkey module
Functions to read input in non-canonical mode.

There are 5 ***curses*** like functions:

+ *getch()*: Gets a character from stdin.
+ *ungetch()*: Puts one or more characters into the key buffer.
+ *getkey()*: Calls getch() and transforms character to keycode.
+ *ungetkey()*: Puts a keycode into the key buffer.
+ *setparams()*: Sets frenquently-used attributes of the input.

And a function to support mouse tracking.

+ *mouse_handler()*: Sets a function to handle mouse report.

Function keycodes in common using are defined in enum class *Key*.

A typical usage example as following:

```python
    import ltermio
    from ltermio import Key

    ltermio.setparams(echo=False)
    key = ltermio.getkey()
    while key != Key.ESC:
        ...
        key = ltermio.getkey()
    ltermio.setparams()
```

## termouse module
Detects and reports mouse events.

The implementation of the module follows the **XTerm** specification of the mouse tracking and uses normal tracking mode, see also:

<https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking>  
<https://www.xfree86.org/current/ctlseqs.html#Mouse%20Tracking>
    
Calls *ltermio.mouse_tracking_on()* to turn on the mouse tracking, or sets the parameter `mouse=True` on the decorator *ltermio.appentry_args()*.

The mouse events are reported by *ltermio.getkey()*, with value encoded in a 32-bits integer and larger than *Key.MOUSE_EVENT*. It is simple to make difference from normal key codes by `code > Key.MOUSE_EVENT`.  
Decodes the event codes by calling *ltermio.decode_mouse_event()* which returns a tuple with explicit items.
        
An example to get key and mouse inputs as following:

```python
    import ltermio
    from ltermio import Key, MouseEvent

    ltermio.mouse_tracking_on()
    ltermio.setparams(echo=False)

    code = ltermio.getkey()
    while code != Key.CONTROL_X:
        if code > Key.MOUSE_EVENT:
            event, row, col, modifiers = ltermio.decode_mouse_event(code)
            if event == MouseEvent.B1_CLICKED:
                ... # do something with mouse event
        else:
            ... # do something with key input
        code = ltermio.getkey()

    ltermio.setparams(echo=True)
    ltermio.mouse_tracking_off()
```

## unicon module
Collection of some common icons in unicode character set.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "ltermio",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "ansi,color,color256,colour,composing,csi,curses,cursor,getch,keyboard,ltermio,mouse,posix,terminal,termios,termkey,termouse,xfree86,xterm",
    "author": "",
    "author_email": "Brooks Su <yipeng00@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e8/19/397135bc366af363c22814a3d31230973754e0c600c9bf4719caca95a0b9/ltermio-0.6.3.tar.gz",
    "platform": null,
    "description": "# ltermio - A Lightweight POSIX terminal I/O library\n\nThe package contains 5 modules: ***cursor***, ***termkey***, ***termouse***, ***color256*** and ***unicon***. Tested only on **MacOS terminal** and **iTerm2**, so the platform compatibility has not been well verfied yet.  \nAll functions are based on **XTerm** specification, **CSI** sequences and **termios**, no additional requirements other than the standard library.\n\n**Applicability**: They are only for **POSIX** terminal applications.\n\nReferences:  \n<https://en.wikipedia.org/wiki/ANSI_escape_code>  \n<https://invisible-island.net/xterm/ctlseqs/ctlseqs.html>  \n<https://www.xfree86.org/current/ctlseqs.html>\n\n## Installation & Usage\nUses pip to install the package:\n\n`pip3 install ltermio`\n\nMore details on module usage:\n\n`pydoc ltermio.module-name`\n\n## History & Why\nAs we all know, character terminal are outdated facilities, why did I still write such a package?\n\nWhen I was learning **Python** a few months ago, I decided to write a terminal **Tetris** game as a practice of the language learning. Due to the learning reason, I did not want to use any third-party packages. So when I finally finished the game, there naturally formed this by-product.\n\n## color256 module\nSets 256-color display attributes of character terminal.\n\nThere are three pairs of functions to set or restore colors according to their literal name, and another pair to set text display attributes:\n\n```python\n    set_fcolor(color: int)\n    reset_fcolor()\n    set_bcolor(color: int)\n    reset_bcolor()\n    set_color(fcolor: int, bcolor: int)\n    reset_color()\n    set_textattr(attr: TextAttr | int)\n    reset_textattr(attr: TextAttr | int)\n```\n\nAll color functions use indexed color as parameter, function *rgb()* can make indexed color number from given RGB parameters. Enum class *Color* defined constants of some common-used indexed colors and grayscales.\n\nEnum class *TextAttr* defined constants of text display attributes, like *BOLD*, *ITALIC* and *UNERLINED*, etc.\n\nFollowing sample code prints gradually bright colorful greetings:\n\n```python\n    from ltermio import set_fcolor, reset_fcolor\n\n    for i in range(6):\n        for char in 'Hello, color256!':\n            set_fcolor(ord(char) % 32 + 20 + i * 36)\n            print(char, end='')\n        print()\n    reset_fcolor()\n```\n\nAnother sample to output all colors:\n\n```python\n    from ltermio import rgb, set_bcolor, reset_bcolor\n\n    for red in range(6):\n        for green in range(6):\n            for blue in range(6):\n                set_bcolor(rgb(red, green, blue))\n                print('  ', end='')\n        print()\n    reset_bcolor()\n```\n\n## cursor module\nWrapper functions of the **CSI(Control Sequence Introducer)** sequences about cursor and screen.\n\nA several of additional functions are provided for text composing:\n\n```python\n    v_composing(seq: str) -> str\n    downward_seq(text: str, cols: int) -> str\n    vert_seq(text: str) -> str\n    rect_border_seq(width: int, height: int, sym: str) -> str\n```\n\nFollowing sample code of *v_composing()* displays three big colorful greetings:\n\n```python\n    from ltermio import putmsg, v_composing\n\n    _P1 = ':{0}\\x1b3hj'\n    _P15 = ':{0}\\x1b6l:{0}\\x1b11hj'\n    _DASH = '5:{0}\\x1b11hj'\n    _NEXT_POS = '5k17l'\n\n    LETTERS = {\n        'E': v_composing(f'{(_DASH + _P1) * 2}{_DASH}{_NEXT_POS}'),\n        'H': v_composing(f'{_P15 * 2}{_DASH}{_P15 * 2}{_NEXT_POS}'),\n        'L': v_composing(f'{_P1 * 4}{_DASH}{_NEXT_POS}'),\n        'O': v_composing(f'{_DASH}{_P15 * 3}{_DASH}'),\n    }\n\n    greeting = ''.join(map(LETTERS.get, 'HELLO'))\n    putmsg(3, 20, greeting.format('\\u2b50'))\n    putmsg(9, 14, greeting.format('\\u2b55'))\n    putmsg(15, 8, greeting.format('\\U0001f7e2'))\n    print('\\n')\n```\n\n## termkey module\nFunctions to read input in non-canonical mode.\n\nThere are 5 ***curses*** like functions:\n\n+ *getch()*: Gets a character from stdin.\n+ *ungetch()*: Puts one or more characters into the key buffer.\n+ *getkey()*: Calls getch() and transforms character to keycode.\n+ *ungetkey()*: Puts a keycode into the key buffer.\n+ *setparams()*: Sets frenquently-used attributes of the input.\n\nAnd a function to support mouse tracking.\n\n+ *mouse_handler()*: Sets a function to handle mouse report.\n\nFunction keycodes in common using are defined in enum class *Key*.\n\nA typical usage example as following:\n\n```python\n    import ltermio\n    from ltermio import Key\n\n    ltermio.setparams(echo=False)\n    key = ltermio.getkey()\n    while key != Key.ESC:\n        ...\n        key = ltermio.getkey()\n    ltermio.setparams()\n```\n\n## termouse module\nDetects and reports mouse events.\n\nThe implementation of the module follows the **XTerm** specification of the mouse tracking and uses normal tracking mode, see also:\n\n<https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking>  \n<https://www.xfree86.org/current/ctlseqs.html#Mouse%20Tracking>\n    \nCalls *ltermio.mouse_tracking_on()* to turn on the mouse tracking, or sets the parameter `mouse=True` on the decorator *ltermio.appentry_args()*.\n\nThe mouse events are reported by *ltermio.getkey()*, with value encoded in a 32-bits integer and larger than *Key.MOUSE_EVENT*. It is simple to make difference from normal key codes by `code > Key.MOUSE_EVENT`.  \nDecodes the event codes by calling *ltermio.decode_mouse_event()* which returns a tuple with explicit items.\n        \nAn example to get key and mouse inputs as following:\n\n```python\n    import ltermio\n    from ltermio import Key, MouseEvent\n\n    ltermio.mouse_tracking_on()\n    ltermio.setparams(echo=False)\n\n    code = ltermio.getkey()\n    while code != Key.CONTROL_X:\n        if code > Key.MOUSE_EVENT:\n            event, row, col, modifiers = ltermio.decode_mouse_event(code)\n            if event == MouseEvent.B1_CLICKED:\n                ... # do something with mouse event\n        else:\n            ... # do something with key input\n        code = ltermio.getkey()\n\n    ltermio.setparams(echo=True)\n    ltermio.mouse_tracking_off()\n```\n\n## unicon module\nCollection of some common icons in unicode character set.\n",
    "bugtrack_url": null,
    "license": "Apache License Version 2.0, January 2004 http://www.apache.org/licenses/  TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION  1. Definitions.  \"License\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.  \"Licensor\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.  \"Legal Entity\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.  \"You\" (or \"Your\") shall mean an individual or Legal Entity exercising permissions granted by this License.  \"Source\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.  \"Object\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.  \"Work\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).  \"Derivative Works\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.  \"Contribution\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \"Not a Contribution.\"  \"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.  2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.  3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.  4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:  (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and  (b) You must cause any modified files to carry prominent notices stating that You changed the files; and  (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and  (d) If the Work includes a \"NOTICE\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.  You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.  5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.  6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.  7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.  8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.  9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.  END OF TERMS AND CONDITIONS  APPENDIX: How to apply the Apache License to your work.  To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets \"[]\" replaced with your own identifying information. (Don't include the brackets!)  The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same \"printed page\" as the copyright notice for easier identification within third-party archives.  Copyright [yyyy] [name of copyright owner]  Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.",
    "summary": "A lightweight POSIX terminal I/O library",
    "version": "0.6.3",
    "project_urls": {
        "Homepage": "https://github.com/brookssu/ltermio"
    },
    "split_keywords": [
        "ansi",
        "color",
        "color256",
        "colour",
        "composing",
        "csi",
        "curses",
        "cursor",
        "getch",
        "keyboard",
        "ltermio",
        "mouse",
        "posix",
        "terminal",
        "termios",
        "termkey",
        "termouse",
        "xfree86",
        "xterm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "314cfc7f595874f52c9721c27266fbb297ec603150ec9d97148da698f0d9dd7e",
                "md5": "394eac57495bb06d36d4983ceb1cbad1",
                "sha256": "f23adb390fbb0a8e3a592f538ae7db8efa91ac85a8c28ef984aa903f0735e4a9"
            },
            "downloads": -1,
            "filename": "ltermio-0.6.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "394eac57495bb06d36d4983ceb1cbad1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 28332,
            "upload_time": "2024-01-01T01:30:32",
            "upload_time_iso_8601": "2024-01-01T01:30:32.499499Z",
            "url": "https://files.pythonhosted.org/packages/31/4c/fc7f595874f52c9721c27266fbb297ec603150ec9d97148da698f0d9dd7e/ltermio-0.6.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e819397135bc366af363c22814a3d31230973754e0c600c9bf4719caca95a0b9",
                "md5": "a75b37334360da96b163fba419622748",
                "sha256": "6055b37f60fa16ddf62047e91651ef5009d99ea7797a37449ad77a4f92654e20"
            },
            "downloads": -1,
            "filename": "ltermio-0.6.3.tar.gz",
            "has_sig": false,
            "md5_digest": "a75b37334360da96b163fba419622748",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 22767,
            "upload_time": "2024-01-01T01:30:34",
            "upload_time_iso_8601": "2024-01-01T01:30:34.673123Z",
            "url": "https://files.pythonhosted.org/packages/e8/19/397135bc366af363c22814a3d31230973754e0c600c9bf4719caca95a0b9/ltermio-0.6.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-01 01:30:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "brookssu",
    "github_project": "ltermio",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ltermio"
}
        
Elapsed time: 0.16754s