PyPtt 2.3.7__tar.gz → 2.3.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyptt-2.3.7 → pyptt-2.3.9}/PKG-INFO +1 -1
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/__init__.py +1 -1
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/screens.py +3 -1
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt.egg-info/PKG-INFO +1 -1
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_vt100_parser.py +12 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/LICENSE +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/PTT.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_bucket.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_call_status.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_change_pw.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_comment.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_del_post.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_get_board_info.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_get_board_list.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_get_bottom_post_list.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_get_favourite_board.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_get_newest_index.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_get_post.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_get_post_index.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_get_post_list.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_get_time.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_get_user.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_get_waterball.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_give_money.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_has_new_mail.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_loginout.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_mail.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_mark_post.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_post.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_reply_post.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_search_user.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_set_board_title.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_set_signature_file.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_api_util.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_uao/LICENSE +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_uao/__init__.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_uao/b2u.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/_uao/u2b.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/api_server.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/check_value.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/command.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/config.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/connect_core.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/data_type.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/exceptions.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/i18n.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/lang_en_US.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/lang_zh_TW.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/lib_util.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/log.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/service.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt/ssl_config.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt.egg-info/SOURCES.txt +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt.egg-info/dependency_links.txt +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt.egg-info/requires.txt +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/PyPtt.egg-info/top_level.txt +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/README.md +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/pyproject.toml +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/setup.cfg +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/setup.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_backup_effective.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_backup_param.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_bucket.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_change_pw.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_comment.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_connect_core_timeout.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_del_post.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_del_post_unit.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_exceptions.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_fast_post.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_get_board_info.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_get_board_list.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_get_bottom_post_list.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_get_content_formula.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_get_favourite_boards.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_get_mail.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_get_newest_index.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_get_post.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_get_post_list.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_get_post_list_parser.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_get_post_parser.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_get_time.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_get_user.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_get_waterball.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_give_money.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_half_dead_connection.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_i18n.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_incremental_parity.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_init.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_logger.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_login_logout.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_mail_send_and_del.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_mark_post.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_parse_query_post.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_post.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_post_anonymous.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_pyte_parity.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_reply_post.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_search_user.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_service.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_set_board_title.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_set_signature_file.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_status_line.py +0 -0
- {pyptt-2.3.7 → pyptt-2.3.9}/tests/test_uao_codec.py +0 -0
|
@@ -267,7 +267,9 @@ def show(config, screen_queue, function_name=None):
|
|
|
267
267
|
|
|
268
268
|
xy_pattern_h = re.compile(r'^=ESC=\[[\d]+;[\d]+H')
|
|
269
269
|
xy_pattern_s = re.compile(r'^=ESC=\[[\d]+;[\d]+s')
|
|
270
|
-
|
|
270
|
+
# SGR 顏色 + DEC 私有模式開關 (ESC[?2026h/l 同步輸出) + DSR 查詢 (ESC[6n, PTT 不等回應):
|
|
271
|
+
# 後兩者若留著, 引擎會當未知 escape 而丟掉其後整段畫面
|
|
272
|
+
_color_sgr = re.compile(r'\x1B\[(?:[\d+;]*m|\?[\d;]*[hl]|\d*n)')
|
|
271
273
|
|
|
272
274
|
|
|
273
275
|
def _preprocess(data: str) -> str:
|
|
@@ -445,3 +445,15 @@ class TestRealFixtures:
|
|
|
445
445
|
assert '編號' in lines[2] and '看 板' in lines[2] and '類別' in lines[2]
|
|
446
446
|
# Footer action hints.
|
|
447
447
|
assert '增加看板' in lines[23]
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
def test_dec_private_mode_escape_does_not_drop_screen():
|
|
451
|
+
# PTT 送 ESC[?2026h/l (同步輸出); 沒被吃掉時引擎會在此中止, 整個畫面變空白 (登入 LoginError)
|
|
452
|
+
lines = parse(b'\x1b[2J\x1b[?2026h\x1b[3;1Hhello\x1b[?2026l\x1b[4;1Hworld')
|
|
453
|
+
assert 'hello' in lines[2] and 'world' in lines[3]
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
def test_dsr_query_is_ignored():
|
|
457
|
+
# PTT 歡迎畫面送 ESC[6n (DSR 游標位置查詢) 且不等回應; 沒被吃掉時畫面凍結在登入提示之前 (LoginError)
|
|
458
|
+
lines = parse(b'\x1b[2J\x1b[3;1Hhello\x1b[6n\x1b[4;1Hworld')
|
|
459
|
+
assert 'hello' in lines[2] and 'world' in lines[3]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|