aboutsummaryrefslogtreecommitdiff
path: root/pydora/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'pydora/utils.py')
-rw-r--r--pydora/utils.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/pydora/utils.py b/pydora/utils.py
index 47422d6..3c48117 100644
--- a/pydora/utils.py
+++ b/pydora/utils.py
@@ -2,10 +2,15 @@ from __future__ import print_function
2 2
3import os 3import os
4import sys 4import sys
5import termios
6import getpass 5import getpass
7import subprocess 6import subprocess
8 7
8try:
9 import termios
10except ImportError:
11 # Windows does not have a termios module
12 termios = None
13
9 14
10def input(prompt): 15def input(prompt):
11 try: 16 try:
@@ -39,6 +44,9 @@ class Screen(object):
39 44
40 @staticmethod 45 @staticmethod
41 def set_echo(enabled): 46 def set_echo(enabled):
47 if not termios:
48 return
49
42 handle = sys.stdin.fileno() 50 handle = sys.stdin.fileno()
43 if not os.isatty(handle): 51 if not os.isatty(handle):
44 return 52 return