summaryrefslogtreecommitdiff
path: root/urwid/html_fragment.py
Commit message (Collapse)AuthorAgeFilesLines
* [BREAKING CHANGE] Refactoring: Split event loop in several modules (#537)Alexey Stepanov2023-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * [BREAKING CHANGE] Refactoring: Split event loop in several modules * `urwid.main_loop` is split into multiple modules which is easier to maintain * `urwid.compat` is not used anymore and removed * `TornadoEventLoop`, `GLibEventLoop`, `TwistedEventLoop` and `TrioEventLoop` accessible ONLY if required dependencies installed (like: Tornado installed -> `TornadoEventLoop` is accessible for import) * `TornadoEventLoop` use the same idle logic as `AsyncioLoop`: tornado.ioloop.IOLoop is asyncio based. * Trio < 0.15 is not supported. Version 0.15 was released almost 3 years ago. * Tornado < 5.0 is not supported. Tornado 5.0 was released 5 years ago. * Remove useless shebang * `EventLoop` should be real abstract * add new module docstrings * Fix docstrings * remove unneeded import --------- Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
* Fix input handling and extra type annotations (#530)Alexey Stepanov2023-04-051-21/+36
| | | | | | | | | | | * keypress always receive `str` * fix `CF635Screen`: was missed return parameter in get_input_nonblocking * fix `LCDScreen`: wrong type used for buffer (pyserial return `bytes`, concatenation to `str` is wrong) Partial #406 Partial #512 Related #408 Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
* Annotate types in simple cases and use isinstance (& protocol) based type ↵Alexey Stepanov2023-04-041-4/+4
| | | | | | | | | | | checking (#529) * Use `super()` where possible instead of direct base class Related #525 Partial #406 Fix #510 Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
* Python 37+ initial migration (#522)Alexey Stepanov2023-03-311-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial migration to the python 3.7: Semi-automatic changes CI related: Update `tox.ini` and `.travis.yml` to run python3 only tests Python 3.11 tests is commented-out on travis until #517 is not merged Manual changes: * `setup.py`: classifiers, remove python2 compatibility code * `docs/manual/wcur2.py`: looks like file was never completed, syntax is invalid * `urwid.compat`: removed `ord2`, `bytes3`, `text_type`, `xrange` and `text_types` Automatic changes (no manual editing, AST validated equality: * removed `u` prefix from all strings: not allowed in modern python code * `bytes()` -> `b''` * `== None` -> `is None` * subclassing of `object` * `super(<Class>`, self>)` ->`super()` * `from __future__ import ...` python3 compatibility imports * `set(<Iterable[Hashable]>)` -> `{<Hashable>}` * partial f-strings conversion * (`IOError`, `select.error`, `socket.error`) -> `OSError` * Switch to f-strings (automatic changes) * Remove `urwid.compat.B` * Remove `urwid.compat.with_metaclass` * use native `super()` instead of `self.__super` * Remove `urwid.compat.chr2` * Remove `urwid.split_repr.python3_repr` * Use native `@classmethod` and `@property` where overload is not possible * Add `from __future__ import annotations` * automatically sort imports * Add DeprecationWarning to the deprecated methods most IDE's will recognize it and annotate during new code usage call with "warnings as errors" mode will help to refactor other users * Address comments * replace homepage address in all files * remove outdated comments in compat.py * make wcur2.py correct python code. For example subclass * replace `self.__super` by `super()` in examples * fix asyncio_socket_server.py: magic with `asyncio` became wrong * Remove `widget.update_wrapper`: this was backport of python `functools.update_wrapper` * display_common.py: fix trivial typo in _colors calculation * use `sorted` method instead of list construction with later sorting * Address comments * `wcur2` include in docs * warning on `signals.Signals.emit` --------- Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
* Python dual support (#266)Andrew Dunai2018-01-041-6/+10
| | | | | | | | | | | | | | | | | | | | * WIP * Metaclasses * String literal fixes * Remove 2to3 and make tests compatible with both Python 2 & 3 * Removed debug code. * Added tests for ProgressBar * Fixed examples. * future division & font literals fix * Cleaner fonts initialization.
* fix #172 - html_fragment errors on Python 3.4Michael Keirnan2016-02-051-0/+2
|
* Make BaseScreen.start() and stop() idempotent.Eevee (Alex Munroe)2014-06-031-6/+0
|
* Put run_wrapper in the base class; make BaseScreen.start() a contextmanager.Eevee (Alex Munroe)2014-06-031-4/+0
|
* Fix all trailing whitespace.Eevee (Alex Munroe)2014-05-111-23/+23
|
* allow Screen.set_mouse_tracking(False) to disable mouse trackingJim Garrison2013-03-311-1/+1
|
* Remove unnecessary use of "except:" (without an exception class).Marien Zwart2010-03-071-2/+2
|
* Stop calling type() on literals.Marien Zwart2010-03-071-3/+3
|
* Convert implicit relative to absolute imports.Marien Zwart2010-03-071-3/+3
|
* Fix what looks like a typo, but the old code did run so check this carefully.Marien Zwart2010-02-111-1/+1
|
* allow palette_test to run with html_fragment.ScreenIan Ward2009-11-071-1/+7
|
* add highcolor support to html_fragmentIan Ward2009-10-181-43/+27
|
* upate tutorial example code with MainLoop classIan Ward2009-10-141-32/+34
|
* untab html_fragment.pyIan Ward2009-10-141-201/+201
|
* shell.py use generic_main_loop(). generic_main_loop() allow already ↵ian2007-10-271-0/+1
| | | | | | | start()ed screens --HG-- extra : convert_revision : 9c245477237180c4a9c3f3f91706491fc3eb311a
* start() and stop() for web_display and html_fragmentian2007-02-271-0/+6
| | | | | --HG-- extra : convert_revision : 46bea9578d4bcba7106c5fafbb8792d75f5a89c0
* update web_display and html_fragment for new Canvas classesian2007-02-251-42/+28
| | | | | --HG-- extra : convert_revision : db2b97bd3c79265606f887547e237d24ca7572e5
* add clear() method to Screen classes, closes #17release-0.9.7.2ian2007-01-031-0/+8
| | | | | --HG-- extra : convert_revision : 507a323a1f45de1fd01b35a930d8d04f37bb9c1c
* release 0.9.4release-0.9.4ian2006-04-301-1/+5
| | | | | --HG-- extra : convert_revision : bf56df70660040cedf067d1cd5dd4a94edf0e8d1
* release 0.9.0release-0.9.0ian2006-02-181-1/+5
| | | | | --HG-- extra : convert_revision : bdf8d8b157764daa5e0ccd6d8302b3431c10b7d7
* release 0.9.0-pre1release-0.9.0-pre1ian2006-02-081-1/+1
| | | | | --HG-- extra : convert_revision : 973204ec8fda8e21585feda3fc9fdeb7722b282e
* release 0.8.7release-0.8.7ian2005-04-211-1/+1
| | | | | --HG-- extra : convert_revision : 9e26d83b333651fb0be7d6b306a217b54a736f5f
* release 0.8.6release-0.8.6ian2005-01-031-2/+6
| | | | | --HG-- extra : convert_revision : 1214e13b60401fd0dcdac5b946fd9eac467cbe8e
* release 0.8.5release-0.8.5ian2004-12-151-2/+3
| | | | | --HG-- extra : convert_revision : cad9cad78258a2865c97eb229cd3d537d4aa1624
* release 0.8.4release-0.8.4ian2004-11-201-3/+82
| | | | | --HG-- extra : convert_revision : 7461785b9e6374e069a354b596789e4c6543f6d9
* release 0.8.2release-0.8.2ian2004-11-081-9/+9
| | | | | --HG-- extra : convert_revision : e96139876484d8631dc47575c2809998b3ce111c
* release 0.8.1release-0.8.1ian2004-10-291-9/+17
| | | | | --HG-- extra : convert_revision : 9eec2ff890fafcf3d4e1e9e9ba01583be4784964
* release-0.8.0release-0.8.0ian2004-10-171-0/+162
--HG-- extra : convert_revision : 1d04412f7d32aaa07db13dc30590d7cb0d6ea0f6