Skip to content

Commit 93422fe

Browse files
author
a
committed
update
1 parent 18143ff commit 93422fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

callias.xsh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ from xonsh.built_ins import XSH
66

77

88
def _print_to_tty(message):
9-
"""Print message directly to TTY."""
9+
"""
10+
Print message directly to TTY.
11+
If you will try to put this function into the python file and run in bash `python file.py > /tmp/output`
12+
you will have "Inappropriate ioctl for device" so this means that redirecting stdout disable TTY.
13+
"""
1014
try:
1115
tty_name = os.ttyname(sys.stdout.fileno())
1216
with open(tty_name, 'w') as tty:

0 commit comments

Comments
 (0)