zrb 1.15.15__py3-none-any.whl → 1.15.16__py3-none-any.whl
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.
zrb/input/base_input.py
CHANGED
@@ -96,11 +96,19 @@ class BaseInput(AnyInput):
|
|
96
96
|
if default_str != "":
|
97
97
|
prompt_message = f"{prompt_message} [{default_str}]"
|
98
98
|
print(f"{prompt_message}: ", end="")
|
99
|
-
value =
|
99
|
+
value = self._read_line(shared_ctx)
|
100
100
|
if value.strip() == "":
|
101
101
|
value = default_str
|
102
102
|
return value
|
103
103
|
|
104
|
+
def _read_line(self, shared_ctx: AnySharedContext) -> str:
|
105
|
+
if not shared_ctx.is_tty:
|
106
|
+
return input()
|
107
|
+
from prompt_toolkit import PromptSession
|
108
|
+
|
109
|
+
reader = PromptSession()
|
110
|
+
return reader.prompt()
|
111
|
+
|
104
112
|
def get_default_str(self, shared_ctx: AnySharedContext) -> str:
|
105
113
|
"""Get default value as str"""
|
106
114
|
default_value = get_attr(
|
@@ -250,7 +250,7 @@ zrb/group/any_group.py,sha256=sdUk82YRuJBMwDhD_b-vJ3v-Yxz8K7LFW52TM19k3HI,1242
|
|
250
250
|
zrb/group/group.py,sha256=t5JnXlrLfthFfqmkVdRLKCIyms4JqsthcTODVncSmPk,4312
|
251
251
|
zrb/input/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
252
252
|
zrb/input/any_input.py,sha256=3EQgg2Qk_2t2Ege_4pHV2G95tV3XAIThLLuFZ6uV6oM,1051
|
253
|
-
zrb/input/base_input.py,sha256=
|
253
|
+
zrb/input/base_input.py,sha256=oK8lm2UsPe859I8TzmvIhN8a4GZR78BMZuhhVt_GqGI,4107
|
254
254
|
zrb/input/bool_input.py,sha256=9ir8aTm8zaufrJ84_EerC5vOjyn4hHZ3BiLzFqPgPFM,1839
|
255
255
|
zrb/input/float_input.py,sha256=8G9lJKLlb_Upk9m5pBF9JwqlAAiYJLrbIItLnyzPxpg,1475
|
256
256
|
zrb/input/int_input.py,sha256=UhxCFYlZdJcgUSGGEkz301zOgRVpK0KDG_IxxWpQfMU,1457
|
@@ -409,7 +409,7 @@ zrb/util/todo_model.py,sha256=hhzAX-uFl5rsg7iVX1ULlJOfBtblwQ_ieNUxBWfc-Os,1670
|
|
409
409
|
zrb/util/truncate.py,sha256=eSzmjBpc1Qod3lM3M73snNbDOcARHukW_tq36dWdPvc,921
|
410
410
|
zrb/xcom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
411
411
|
zrb/xcom/xcom.py,sha256=o79rxR9wphnShrcIushA0Qt71d_p3ZTxjNf7x9hJB78,1571
|
412
|
-
zrb-1.15.
|
413
|
-
zrb-1.15.
|
414
|
-
zrb-1.15.
|
415
|
-
zrb-1.15.
|
412
|
+
zrb-1.15.16.dist-info/METADATA,sha256=7XfExXjX7pcW0SzAEoDwJQ1WXa02JfM6JyIddL9n96k,9775
|
413
|
+
zrb-1.15.16.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
414
|
+
zrb-1.15.16.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
|
415
|
+
zrb-1.15.16.dist-info/RECORD,,
|
File without changes
|
File without changes
|