summaryrefslogtreecommitdiff
path: root/sphinx/quickstart.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2017-01-29 13:30:30 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2017-01-29 13:30:30 +0900
commit678cc3d50363e927ab904b61e9d7eaee04f4e965 (patch)
tree65bdd18456ef3cf387c37da1f6dd6a8a55c55ddc /sphinx/quickstart.py
parent14a864a63700668cfe84565bcef0dd26846afabb (diff)
downloadsphinx-git-678cc3d50363e927ab904b61e9d7eaee04f4e965.tar.gz
Fix #3364: sphinx-quickstart prompts overflow on Console with 80 chars width
Diffstat (limited to 'sphinx/quickstart.py')
-rw-r--r--sphinx/quickstart.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py
index dda98ce5a..0bc6bd9f7 100644
--- a/sphinx/quickstart.py
+++ b/sphinx/quickstart.py
@@ -43,9 +43,6 @@ from sphinx.util import texescape
TERM_ENCODING = getattr(sys.stdin, 'encoding', None)
-# function to get input from terminal -- overridden by the test suite
-term_input = input
-
DEFAULT_VALUE = {
'path': '.',
'sep': False,
@@ -73,6 +70,12 @@ def mkdir_p(dir):
os.makedirs(dir)
+# function to get input from terminal -- overridden by the test suite
+def term_input(prompt):
+ sys.stdout.write(prompt)
+ return input('')
+
+
class ValidationError(Exception):
"""Raised for validation errors."""