ibm5250 0.1.0.dev14__tar.gz → 0.1.0.dev15__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.
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/PKG-INFO +1 -1
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/pyproject.toml +1 -1
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/src/ibm5250/data-stream-logic.md +9 -0
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/src/ibm5250/screen.py +16 -0
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/src/ibm5250/terminal.py +3 -3
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/uv.lock +2 -2
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/.github/copilot-instructions.md +0 -0
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/.github/workflows/README.md +0 -0
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/.github/workflows/publish.yml +0 -0
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/.gitignore +0 -0
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/LICENSE +0 -0
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/README.md +0 -0
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/scripts/compute_version.py +0 -0
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/src/ibm5250/__init__.py +0 -0
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/src/ibm5250/connection.py +0 -0
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/src/ibm5250/constants.py +0 -0
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/src/ibm5250/datastream.py +0 -0
- {ibm5250-0.1.0.dev14 → ibm5250-0.1.0.dev15}/src/ibm5250/exceptions.py +0 -0
|
@@ -245,6 +245,15 @@ next field once the current one is full. Only the modified-data tags are cleared
|
|
|
245
245
|
locally; the resulting screen (often a Save/Restore popup handshake) is driven
|
|
246
246
|
entirely by the host and handled by `_recv_and_apply()`.
|
|
247
247
|
|
|
248
|
+
### Monocase fields
|
|
249
|
+
|
|
250
|
+
FFW byte 1 bit `0x20` is **Monocase** (`Field.is_monocase`). IBM i sets it on
|
|
251
|
+
every DDS character field defined without `CHECK(LC)`. The workstation, not the
|
|
252
|
+
host, is responsible for folding lower-case input to upper case, so
|
|
253
|
+
`Screen.set_field_text` (and therefore `type_into`, `FieldProxy.value` and
|
|
254
|
+
`send_command`) upper-cases text written to such a field. Note this is unrelated
|
|
255
|
+
to the FFW field type: _alpha shift_ (`000`) only means "accept any character".
|
|
256
|
+
|
|
248
257
|
### Waiting: `wait_for_text(text)`
|
|
249
258
|
|
|
250
259
|
1. Checks if the text already appears on screen (from events already applied).
|
|
@@ -117,6 +117,18 @@ class Field:
|
|
|
117
117
|
"""True when the field's display attribute is 'non-display' (password)."""
|
|
118
118
|
return self.attribute & Attr.NON_DISPLAY_MASK == Attr.NON_DISPLAY_MASK
|
|
119
119
|
|
|
120
|
+
@property
|
|
121
|
+
def is_monocase(self) -> bool:
|
|
122
|
+
"""True when the FFW Monocase bit is set.
|
|
123
|
+
|
|
124
|
+
The workstation folds lower-case input to upper case in such fields;
|
|
125
|
+
the host does not translate it. IBM i sets this bit on every DDS
|
|
126
|
+
character field defined without ``CHECK(LC)``.
|
|
127
|
+
"""
|
|
128
|
+
return len(self.field_format_word) >= 2 and bool(
|
|
129
|
+
self.field_format_word[1] & FFW.MONOCASE
|
|
130
|
+
)
|
|
131
|
+
|
|
120
132
|
@property
|
|
121
133
|
def auto_enter(self) -> bool:
|
|
122
134
|
"""True when the FFW Auto-Enter bit is set.
|
|
@@ -408,9 +420,13 @@ class Screen:
|
|
|
408
420
|
single-row write area.
|
|
409
421
|
|
|
410
422
|
Sets the MDT bit so the field is included in the next AID response.
|
|
423
|
+
Text written to a monocase field is upper-cased, as a 5250 terminal
|
|
424
|
+
does for keyboard input.
|
|
411
425
|
"""
|
|
412
426
|
if f.is_protected:
|
|
413
427
|
raise FieldNotFound("Cannot write to a protected field")
|
|
428
|
+
if f.is_monocase:
|
|
429
|
+
text = text.upper()
|
|
414
430
|
encoded = ebcdic_encode(text)
|
|
415
431
|
# IBM i signon screens write label text for the *next* field into the
|
|
416
432
|
# tail of the current field's formal area (on the following row). Only
|
|
@@ -82,7 +82,8 @@ class FieldProxy:
|
|
|
82
82
|
"""Write *text* into the field (marks MDT).
|
|
83
83
|
|
|
84
84
|
Routed through :meth:`Terminal.type_into`, so filling a field whose FFW
|
|
85
|
-
has the Auto-Enter bit set submits the host's Enter AID automatically
|
|
85
|
+
has the Auto-Enter bit set submits the host's Enter AID automatically,
|
|
86
|
+
and text written to a monocase field is upper-cased.
|
|
86
87
|
"""
|
|
87
88
|
self._term.type_into(self._field, text)
|
|
88
89
|
|
|
@@ -697,8 +698,7 @@ class Terminal:
|
|
|
697
698
|
if time.monotonic() >= deadline:
|
|
698
699
|
if fail_on_timeout:
|
|
699
700
|
raise ScreenWaitTimeout(
|
|
700
|
-
f"Timed out waiting for {desc} after {timeout or self._timeout}s
|
|
701
|
-
f"Current screen:\n{self._screen.get_screen_text()}"
|
|
701
|
+
f"Timed out waiting for {desc} after {timeout or self._timeout}s"
|
|
702
702
|
)
|
|
703
703
|
else:
|
|
704
704
|
log.debug(f"Timeout reached while waiting for {desc} after {timeout or self._timeout}s, continuing anyway")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
version = 1
|
|
2
|
-
revision =
|
|
2
|
+
revision = 5
|
|
3
3
|
requires-python = ">=3.11"
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
@@ -13,7 +13,7 @@ wheels = [
|
|
|
13
13
|
|
|
14
14
|
[[package]]
|
|
15
15
|
name = "ibm5250"
|
|
16
|
-
version = "0.1.0.
|
|
16
|
+
version = "0.1.0.dev15"
|
|
17
17
|
source = { editable = "." }
|
|
18
18
|
|
|
19
19
|
[package.dev-dependencies]
|
|
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
|