Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bliss
bliss
Commits
85f3d5f8
Commit
85f3d5f8
authored
May 23, 2022
by
Perceval Guillou
Browse files
patch StdoutProxy
parent
175aca9f
Pipeline
#75583
passed with stages
in 100 minutes and 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bliss/shell/cli/repl.py
View file @
85f3d5f8
...
...
@@ -28,7 +28,11 @@ from collections import deque
from
datetime
import
datetime
import
ptpython.layout
from
prompt_toolkit.patch_stdout
import
patch_stdout
as
patch_stdout_context
from
prompt_toolkit.patch_stdout
import
(
patch_stdout
as
patch_stdout_context
,
StdoutProxy
,
)
from
prompt_toolkit
import
patch_stdout
as
patch_stdout_module
from
prompt_toolkit.output
import
DummyOutput
# imports needed to have control over _execute of ptpython
...
...
@@ -61,6 +65,17 @@ from bliss.common.protocols import ErrorReportInterface
logger
=
logging
.
getLogger
(
__name__
)
class
BlissStdoutProxy
(
StdoutProxy
):
def
_write
(
self
,
data
:
str
):
res
=
super
().
_write
(
data
)
if
"
\r
"
in
data
:
self
.
flush
()
return
res
patch_stdout_module
.
StdoutProxy
=
BlissStdoutProxy
if
is_windows
():
class
Terminal
:
...
...
@@ -69,6 +84,7 @@ if is_windows():
raise
AttributeError
(
prop
)
return
""
else
:
from
blessings
import
Terminal
...
...
Matias Guijarro
@matias.guijarro
mentioned in commit
56b2d64c
·
May 23, 2022
mentioned in commit
56b2d64c
mentioned in commit 56b2d64c0c9f0687fb0ca27775e9559c23084c63
Toggle commit list
Matias Guijarro
@matias.guijarro
mentioned in merge request
!4681 (merged)
·
May 23, 2022
mentioned in merge request
!4681 (merged)
mentioned in merge request !4681
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment