##// END OF EJS Templates
Merge pull request #8521 from Carreau/close-14-remove-Term...
Kyle Kelley -
r21440:c4d05dcc merge
parent child Browse files
Show More
@@ -38,7 +38,7 b' from IPython.testing.skipdoctest import skip_doctest'
38 from IPython.utils import py3compat
38 from IPython.utils import py3compat
39 from IPython.utils.py3compat import builtin_mod, iteritems, PY3
39 from IPython.utils.py3compat import builtin_mod, iteritems, PY3
40 from IPython.utils.contexts import preserve_keys
40 from IPython.utils.contexts import preserve_keys
41 from IPython.utils.io import capture_output
41 from IPython.utils.capture import capture_output
42 from IPython.utils.ipstruct import Struct
42 from IPython.utils.ipstruct import Struct
43 from IPython.utils.module_paths import find_mod
43 from IPython.utils.module_paths import find_mod
44 from IPython.utils.path import get_py_filename, unquote_filename, shellglob
44 from IPython.utils.path import get_py_filename, unquote_filename, shellglob
@@ -226,8 +226,7 b' class ProfileDir(LoggingConfigurable):'
226 Parameters
226 Parameters
227 ----------
227 ----------
228 profile_dir : unicode or str
228 profile_dir : unicode or str
229 The path of the profile directory. This is expanded using
229 The path of the profile directory.
230 :func:`IPython.utils.genutils.expand_path`.
231 """
230 """
232 profile_dir = expand_path(profile_dir)
231 profile_dir = expand_path(profile_dir)
233 if not os.path.isdir(profile_dir):
232 if not os.path.isdir(profile_dir):
@@ -10,14 +10,9 b' from __future__ import print_function'
10 from __future__ import absolute_import
10 from __future__ import absolute_import
11
11
12
12
13 import codecs
14 from contextlib import contextmanager
15 import io
16 import os
13 import os
17 import shutil
18 import sys
14 import sys
19 import tempfile
15 import tempfile
20 import warnings
21 from warnings import warn
16 from warnings import warn
22 from .capture import CapturedIO, capture_output
17 from .capture import CapturedIO, capture_output
23 from .py3compat import string_types, input, PY3
18 from .py3compat import string_types, input, PY3
@@ -82,23 +77,6 b' stdin = IOStream(sys.stdin, fallback=devnull)'
82 stdout = IOStream(sys.stdout, fallback=devnull)
77 stdout = IOStream(sys.stdout, fallback=devnull)
83 stderr = IOStream(sys.stderr, fallback=devnull)
78 stderr = IOStream(sys.stderr, fallback=devnull)
84
79
85 class IOTerm:
86 """ Term holds the file or file-like objects for handling I/O operations.
87
88 These are normally just sys.stdin, sys.stdout and sys.stderr but for
89 Windows they can can replaced to allow editing the strings before they are
90 displayed."""
91
92 # In the future, having IPython channel all its I/O operations through
93 # this class will make it easier to embed it into other environments which
94 # are not a normal terminal (such as a GUI-based shell)
95 def __init__(self, stdin=None, stdout=None, stderr=None):
96 mymodule = sys.modules[__name__]
97 self.stdin = IOStream(stdin, mymodule.stdin)
98 self.stdout = IOStream(stdout, mymodule.stdout)
99 self.stderr = IOStream(stderr, mymodule.stderr)
100
101
102 class Tee(object):
80 class Tee(object):
103 """A class to duplicate an output stream to stdout/err.
81 """A class to duplicate an output stream to stdout/err.
104
82
General Comments 0
You need to be logged in to leave comments. Login now