the __future__ is now.
Paul Ivanov -
r22963:2961b531
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -18,7 +18,6 http://ipython.org
18 #-----------------------------------------------------------------------------
18 #-----------------------------------------------------------------------------
19 # Imports
19 # Imports
20 #-----------------------------------------------------------------------------
20 #-----------------------------------------------------------------------------
21 from __future__ import absolute_import
22
21
23 import os
22 import os
24 import sys
23 import sys
@@ -25,7 +25,6 Authors
25 #-----------------------------------------------------------------------------
25 #-----------------------------------------------------------------------------
26 # Imports
26 # Imports
27 #-----------------------------------------------------------------------------
27 #-----------------------------------------------------------------------------
28 from __future__ import print_function
29
28
30 # Stdlib imports
29 # Stdlib imports
31 import __future__
30 import __future__
@@ -13,7 +13,6 upstream and were accepted as of Python 2.3,
13 # Some of this code originated from rlcompleter in the Python standard library
13 # Some of this code originated from rlcompleter in the Python standard library
14 # Copyright (C) 2001 Python Software Foundation, www.python.org
14 # Copyright (C) 2001 Python Software Foundation, www.python.org
15
15
16 from __future__ import print_function
17
16
18 import __main__
17 import __main__
19 import glob
18 import glob
@@ -14,7 +14,6 These are all loaded by default by IPython.
14 #-----------------------------------------------------------------------------
14 #-----------------------------------------------------------------------------
15 # Imports
15 # Imports
16 #-----------------------------------------------------------------------------
16 #-----------------------------------------------------------------------------
17 from __future__ import print_function
18
17
19 # Stdlib imports
18 # Stdlib imports
20 import glob
19 import glob
@@ -18,7 +18,6 Authors:
18 #-----------------------------------------------------------------------------
18 #-----------------------------------------------------------------------------
19 # Imports
19 # Imports
20 #-----------------------------------------------------------------------------
20 #-----------------------------------------------------------------------------
21 from __future__ import print_function
22
21
23 import os
22 import os
24 import sys
23 import sys
@@ -24,7 +24,6 http://www.python.org/2.2.3/license.html"""
24 #
24 #
25 #
25 #
26 #*****************************************************************************
26 #*****************************************************************************
27 from __future__ import print_function
28
27
29 import bdb
28 import bdb
30 import functools
29 import functools
@@ -4,7 +4,6
4 # Copyright (c) IPython Development Team.
4 # Copyright (c) IPython Development Team.
5 # Distributed under the terms of the Modified BSD License.
5 # Distributed under the terms of the Modified BSD License.
6
6
7 from __future__ import print_function
8
7
9 try:
8 try:
10 from base64 import encodebytes as base64_encode
9 from base64 import encodebytes as base64_encode
@@ -7,7 +7,6 This defines a callable class that IPython uses for `sys.displayhook`.
7 # Copyright (c) IPython Development Team.
7 # Copyright (c) IPython Development Team.
8 # Distributed under the terms of the Modified BSD License.
8 # Distributed under the terms of the Modified BSD License.
9
9
10 from __future__ import print_function
11
10
12 import sys
11 import sys
13 import io as _io
12 import io as _io
@@ -15,7 +15,6 spec.
15 # Copyright (c) IPython Development Team.
15 # Copyright (c) IPython Development Team.
16 # Distributed under the terms of the Modified BSD License.
16 # Distributed under the terms of the Modified BSD License.
17
17
18 from __future__ import print_function
19
18
20 import sys
19 import sys
21
20
@@ -12,7 +12,6 events and the arguments which will be passed to them.
12
12
13 This API is experimental in IPython 2.0, and may be revised in future versions.
13 This API is experimental in IPython 2.0, and may be revised in future versions.
14 """
14 """
15 from __future__ import print_function
16
15
17 class EventManager(object):
16 class EventManager(object):
18 """Manage a collection of events and a sequence of callbacks for each.
17 """Manage a collection of events and a sequence of callbacks for each.
@@ -3,7 +3,6
3 # Copyright (c) IPython Development Team.
3 # Copyright (c) IPython Development Team.
4 # Distributed under the terms of the Modified BSD License.
4 # Distributed under the terms of the Modified BSD License.
5
5
6 from __future__ import print_function
7
6
8 import atexit
7 import atexit
9 import datetime
8 import datetime
@@ -4,7 +4,6 An application for managing IPython history.
4
4
5 To be invoked as the `ipython history` subcommand.
5 To be invoked as the `ipython history` subcommand.
6 """
6 """
7 from __future__ import print_function
8
7
9 import os
8 import os
10 import sqlite3
9 import sqlite3
@@ -10,7 +10,6
10 # the file COPYING, distributed as part of this software.
10 # the file COPYING, distributed as part of this software.
11 #-----------------------------------------------------------------------------
11 #-----------------------------------------------------------------------------
12
12
13 from __future__ import absolute_import, print_function
14
13
15 import __future__
14 import __future__
16 import abc
15 import abc
@@ -1,6 +1,5
1 """Logger class for IPython's logging facilities.
1 """Logger class for IPython's logging facilities.
2 """
2 """
3 from __future__ import print_function
4
3
5 #*****************************************************************************
4 #*****************************************************************************
6 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
5 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
@@ -1,7 +1,6
1 # encoding: utf-8
1 # encoding: utf-8
2 """Magic functions for InteractiveShell.
2 """Magic functions for InteractiveShell.
3 """
3 """
4 from __future__ import print_function
5
4
6 #-----------------------------------------------------------------------------
5 #-----------------------------------------------------------------------------
7 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
6 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
@@ -1,7 +1,5
1 """Implementation of magic functions that control various automatic behaviors.
1 """Implementation of magic functions that control various automatic behaviors.
2 """
2 """
3 from __future__ import print_function
4 from __future__ import absolute_import
5 #-----------------------------------------------------------------------------
3 #-----------------------------------------------------------------------------
6 # Copyright (c) 2012 The IPython Development Team.
4 # Copyright (c) 2012 The IPython Development Team.
7 #
5 #
@@ -1,7 +1,5
1 """Implementation of basic magic functions."""
1 """Implementation of basic magic functions."""
2
2
3 from __future__ import print_function
4 from __future__ import absolute_import
5
3
6 import argparse
4 import argparse
7 import io
5 import io
@@ -1,7 +1,5
1 """Implementation of code management magic functions.
1 """Implementation of code management magic functions.
2 """
2 """
3 from __future__ import print_function
4 from __future__ import absolute_import
5 #-----------------------------------------------------------------------------
3 #-----------------------------------------------------------------------------
6 # Copyright (c) 2012 The IPython Development Team.
4 # Copyright (c) 2012 The IPython Development Team.
7 #
5 #
@@ -1,7 +1,5
1 """Implementation of configuration-related magic functions.
1 """Implementation of configuration-related magic functions.
2 """
2 """
3 from __future__ import print_function
4 from __future__ import absolute_import
5 #-----------------------------------------------------------------------------
3 #-----------------------------------------------------------------------------
6 # Copyright (c) 2012 The IPython Development Team.
4 # Copyright (c) 2012 The IPython Development Team.
7 #
5 #
@@ -4,8 +4,6
4 # Copyright (c) IPython Development Team.
4 # Copyright (c) IPython Development Team.
5 # Distributed under the terms of the Modified BSD License.
5 # Distributed under the terms of the Modified BSD License.
6
6
7 from __future__ import print_function
8 from __future__ import absolute_import
9
7
10 import ast
8 import ast
11 import bdb
9 import bdb
@@ -1,6 +1,5
1 """Implementation of magic functions for the extension machinery.
1 """Implementation of magic functions for the extension machinery.
2 """
2 """
3 from __future__ import print_function
4 #-----------------------------------------------------------------------------
3 #-----------------------------------------------------------------------------
5 # Copyright (c) 2012 The IPython Development Team.
4 # Copyright (c) 2012 The IPython Development Team.
6 #
5 #
@@ -11,7 +11,6
11 #-----------------------------------------------------------------------------
11 #-----------------------------------------------------------------------------
12 # Imports
12 # Imports
13 #-----------------------------------------------------------------------------
13 #-----------------------------------------------------------------------------
14 from __future__ import print_function
15
14
16 # Stdlib
15 # Stdlib
17 import os
16 import os
@@ -1,6 +1,5
1 """Implementation of namespace-related magic functions.
1 """Implementation of namespace-related magic functions.
2 """
2 """
3 from __future__ import print_function
4 #-----------------------------------------------------------------------------
3 #-----------------------------------------------------------------------------
5 # Copyright (c) 2012 The IPython Development Team.
4 # Copyright (c) 2012 The IPython Development Team.
6 #
5 #
@@ -3,7 +3,6
3 Note: this module is named 'osm' instead of 'os' to avoid a collision with the
3 Note: this module is named 'osm' instead of 'os' to avoid a collision with the
4 builtin.
4 builtin.
5 """
5 """
6 from __future__ import print_function
7 #-----------------------------------------------------------------------------
6 #-----------------------------------------------------------------------------
8 # Copyright (c) 2012 The IPython Development Team.
7 # Copyright (c) 2012 The IPython Development Team.
9 #
8 #
@@ -1,6 +1,5
1 """Implementation of magic functions for matplotlib/pylab support.
1 """Implementation of magic functions for matplotlib/pylab support.
2 """
2 """
3 from __future__ import print_function
4 #-----------------------------------------------------------------------------
3 #-----------------------------------------------------------------------------
5 # Copyright (c) 2012 The IPython Development Team.
4 # Copyright (c) 2012 The IPython Development Team.
6 #
5 #
@@ -1,5 +1,4
1 """Magic functions for running cells in various scripts."""
1 """Magic functions for running cells in various scripts."""
2 from __future__ import print_function
3
2
4 # Copyright (c) IPython Development Team.
3 # Copyright (c) IPython Development Team.
5 # Distributed under the terms of the Modified BSD License.
4 # Distributed under the terms of the Modified BSD License.
@@ -10,8 +10,6 reference the name under which an object is being read.
10 # Copyright (c) IPython Development Team.
10 # Copyright (c) IPython Development Team.
11 # Distributed under the terms of the Modified BSD License.
11 # Distributed under the terms of the Modified BSD License.
12
12
13 from __future__ import print_function
14
15 __all__ = ['Inspector','InspectColors']
13 __all__ = ['Inspector','InspectColors']
16
14
17 # stdlib modules
15 # stdlib modules
@@ -13,7 +13,6 rid of that dependency, we could move it there.
13 # Copyright (c) IPython Development Team.
13 # Copyright (c) IPython Development Team.
14 # Distributed under the terms of the Modified BSD License.
14 # Distributed under the terms of the Modified BSD License.
15
15
16 from __future__ import print_function
17
16
18 import os
17 import os
19 import re
18 import re
@@ -9,7 +9,6 Authors:
9 * Min RK
9 * Min RK
10
10
11 """
11 """
12 from __future__ import print_function
13
12
14 #-----------------------------------------------------------------------------
13 #-----------------------------------------------------------------------------
15 # Copyright (C) 2008 The IPython Development Team
14 # Copyright (C) 2008 The IPython Development Team
@@ -1,6 +1,5
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """Pylab (matplotlib) support utilities."""
2 """Pylab (matplotlib) support utilities."""
3 from __future__ import print_function
4
3
5 # Copyright (c) IPython Development Team.
4 # Copyright (c) IPython Development Team.
6 # Distributed under the terms of the Modified BSD License.
5 # Distributed under the terms of the Modified BSD License.
@@ -7,9 +7,6 launch InteractiveShell instances, load extensions, etc.
7 # Copyright (c) IPython Development Team.
7 # Copyright (c) IPython Development Team.
8 # Distributed under the terms of the Modified BSD License.
8 # Distributed under the terms of the Modified BSD License.
9
9
10 from __future__ import absolute_import
11 from __future__ import print_function
12
13 import glob
10 import glob
14 import os
11 import os
15 import sys
12 import sys
@@ -1,5 +1,4
1 # coding: iso-8859-5
1 # coding: iso-8859-5
2 # (Unlikely to be the default encoding for most testers.)
2 # (Unlikely to be the default encoding for most testers.)
3 # ������������������� <- Cyrillic characters
3 # ������������������� <- Cyrillic characters
4 from __future__ import unicode_literals
5 u = '����'
4 u = '����'
@@ -1,3 +1,2
1 from __future__ import print_function
2 import sys
1 import sys
3 print(sys.argv[1:])
2 print(sys.argv[1:])
@@ -12,7 +12,6 This script is meant to be called by other parts of the test suite that call it
12 via %run as if it were executed interactively by the user. As of 2011-05-29,
12 via %run as if it were executed interactively by the user. As of 2011-05-29,
13 test_run.py calls it.
13 test_run.py calls it.
14 """
14 """
15 from __future__ import print_function
16
15
17 #-----------------------------------------------------------------------------
16 #-----------------------------------------------------------------------------
18 # Module imports
17 # Module imports
@@ -2,7 +2,6
2
2
3 See test_run for details."""
3 See test_run for details."""
4
4
5 from __future__ import print_function
6
5
7 import sys
6 import sys
8
7
@@ -12,7 +12,6
12 #-----------------------------------------------------------------------------
12 #-----------------------------------------------------------------------------
13 # Imports
13 # Imports
14 #-----------------------------------------------------------------------------
14 #-----------------------------------------------------------------------------
15 from __future__ import print_function
16
15
17 # Stdlib imports
16 # Stdlib imports
18 import linecache
17 import linecache
@@ -2,7 +2,6
2 """Tests for completerlib.
2 """Tests for completerlib.
3
3
4 """
4 """
5 from __future__ import absolute_import
6
5
7 #-----------------------------------------------------------------------------
6 #-----------------------------------------------------------------------------
8 # Imports
7 # Imports
@@ -1,6 +1,5
1 """Tests for debugging machinery.
1 """Tests for debugging machinery.
2 """
2 """
3 from __future__ import print_function
4
3
5 # Copyright (c) IPython Development Team.
4 # Copyright (c) IPython Development Team.
6 # Distributed under the terms of the Modified BSD License.
5 # Distributed under the terms of the Modified BSD License.
@@ -1,7 +1,6
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """Tests for CommandChainDispatcher."""
2 """Tests for CommandChainDispatcher."""
3
3
4 from __future__ import absolute_import
5
4
6 #-----------------------------------------------------------------------------
5 #-----------------------------------------------------------------------------
7 # Imports
6 # Imports
@@ -1,7 +1,6
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """Tests for the inputsplitter module."""
2 """Tests for the inputsplitter module."""
3
3
4 from __future__ import print_function
5
4
6 # Copyright (c) IPython Development Team.
5 # Copyright (c) IPython Development Team.
7 # Distributed under the terms of the Modified BSD License.
6 # Distributed under the terms of the Modified BSD License.
@@ -143,7 +143,6 class InteractiveShellTestCase(unittest.TestCase):
143
143
144 def test_future_flags(self):
144 def test_future_flags(self):
145 """Check that future flags are used for parsing code (gh-777)"""
145 """Check that future flags are used for parsing code (gh-777)"""
146 ip.run_cell('from __future__ import print_function')
147 try:
146 try:
148 ip.run_cell('prfunc_return_val = print(1,2, sep=" ")')
147 ip.run_cell('prfunc_return_val = print(1,2, sep=" ")')
149 assert 'prfunc_return_val' in ip.user_ns
148 assert 'prfunc_return_val' in ip.user_ns
@@ -151,18 +150,6 class InteractiveShellTestCase(unittest.TestCase):
151 # Reset compiler flags so we don't mess up other tests.
150 # Reset compiler flags so we don't mess up other tests.
152 ip.compile.reset_compiler_flags()
151 ip.compile.reset_compiler_flags()
153
152
154 def test_future_unicode(self):
155 """Check that unicode_literals is imported from __future__ (gh #786)"""
156 try:
157 ip.run_cell(u'byte_str = "a"')
158 assert isinstance(ip.user_ns['byte_str'], str) # string literals are byte strings by default
159 ip.run_cell('from __future__ import unicode_literals')
160 ip.run_cell(u'unicode_str = "a"')
161 assert isinstance(ip.user_ns['unicode_str'], unicode_type) # strings literals are now unicode
162 finally:
163 # Reset compiler flags so we don't mess up other tests.
164 ip.compile.reset_compiler_flags()
165
166 def test_can_pickle(self):
153 def test_can_pickle(self):
167 "Can we pickle objects defined interactively (GH-29)"
154 "Can we pickle objects defined interactively (GH-29)"
168 ip = get_ipython()
155 ip = get_ipython()
@@ -3,7 +3,6
3
3
4 Needs to be run by nose (to make ipython session available).
4 Needs to be run by nose (to make ipython session available).
5 """
5 """
6 from __future__ import absolute_import
7
6
8 import io
7 import io
9 import os
8 import os
@@ -2,7 +2,6
2
2
3 Needs to be run by nose (to make ipython session available).
3 Needs to be run by nose (to make ipython session available).
4 """
4 """
5 from __future__ import absolute_import
6
5
7 #-----------------------------------------------------------------------------
6 #-----------------------------------------------------------------------------
8 # Imports
7 # Imports
@@ -4,7 +4,6
4 # Copyright (c) IPython Development Team.
4 # Copyright (c) IPython Development Team.
5 # Distributed under the terms of the Modified BSD License.
5 # Distributed under the terms of the Modified BSD License.
6
6
7 from __future__ import print_function
8
7
9 import os
8 import os
10 import re
9 import re
@@ -15,7 +15,6 Authors
15 * MinRK
15 * MinRK
16
16
17 """
17 """
18 from __future__ import absolute_import
19
18
20 #-----------------------------------------------------------------------------
19 #-----------------------------------------------------------------------------
21 # Imports
20 # Imports
@@ -4,7 +4,6
4 # Copyright (c) IPython Development Team.
4 # Copyright (c) IPython Development Team.
5 # Distributed under the terms of the Modified BSD License.
5 # Distributed under the terms of the Modified BSD License.
6
6
7 from __future__ import print_function
8
7
9 from io import UnsupportedOperation, BytesIO
8 from io import UnsupportedOperation, BytesIO
10
9
@@ -11,7 +11,6 and we do so in a common test_magic file.
11 # Copyright (c) IPython Development Team.
11 # Copyright (c) IPython Development Team.
12 # Distributed under the terms of the Modified BSD License.
12 # Distributed under the terms of the Modified BSD License.
13
13
14 from __future__ import absolute_import
15
14
16
15
17 import functools
16 import functools
@@ -88,9 +88,6 Inheritance diagram:
88 # the file COPYING, distributed as part of this software.
88 # the file COPYING, distributed as part of this software.
89 #*****************************************************************************
89 #*****************************************************************************
90
90
91 from __future__ import absolute_import
92 from __future__ import unicode_literals
93 from __future__ import print_function
94
91
95 import dis
92 import dis
96 import inspect
93 import inspect
@@ -87,7 +87,6 Some of the known remaining caveats are:
87
87
88 - C extension modules cannot be reloaded, and so cannot be autoreloaded.
88 - C extension modules cannot be reloaded, and so cannot be autoreloaded.
89 """
89 """
90 from __future__ import print_function
91
90
92 skip_doctest = True
91 skip_doctest = True
93
92
@@ -9,7 +9,6 To automatically restore stored variables at startup, add this to your
9
9
10 c.StoreMagics.autorestore = True
10 c.StoreMagics.autorestore = True
11 """
11 """
12 from __future__ import print_function
13
12
14 # Copyright (c) IPython Development Team.
13 # Copyright (c) IPython Development Team.
15 # Distributed under the terms of the Modified BSD License.
14 # Distributed under the terms of the Modified BSD License.
@@ -21,7 +21,6 separate implementation).
21 An example notebook is provided in our documentation illustrating interactive
21 An example notebook is provided in our documentation illustrating interactive
22 use of the system.
22 use of the system.
23 """
23 """
24 from __future__ import print_function
25
24
26 #*****************************************************************************
25 #*****************************************************************************
27 # Copyright (C) 2005-2006 Fernando Perez <fperez@colorado.edu>
26 # Copyright (C) 2005-2006 Fernando Perez <fperez@colorado.edu>
@@ -25,7 +25,6 A reference to the original :func:`python:reload` is stored in this module as
25 This code is almost entirely based on knee.py, which is a Python
25 This code is almost entirely based on knee.py, which is a Python
26 re-implementation of hierarchical module import.
26 re-implementation of hierarchical module import.
27 """
27 """
28 from __future__ import print_function
29 #*****************************************************************************
28 #*****************************************************************************
30 # Copyright (C) 2001 Nathaniel Gray <n8gray@caltech.edu>
29 # Copyright (C) 2001 Nathaniel Gray <n8gray@caltech.edu>
31 #
30 #
@@ -170,7 +170,6 The following is a very simple example of a valid demo file.
170 ################### END EXAMPLE DEMO <ex_demo.py> ############################
170 ################### END EXAMPLE DEMO <ex_demo.py> ############################
171 """
171 """
172
172
173 from __future__ import unicode_literals
174
173
175 #*****************************************************************************
174 #*****************************************************************************
176 # Copyright (C) 2005-2006 Fernando Perez. <Fernando.Perez@colorado.edu>
175 # Copyright (C) 2005-2006 Fernando Perez. <Fernando.Perez@colorado.edu>
@@ -179,7 +178,6 from __future__ import unicode_literals
179 # the file COPYING, distributed as part of this software.
178 # the file COPYING, distributed as part of this software.
180 #
179 #
181 #*****************************************************************************
180 #*****************************************************************************
182 from __future__ import print_function
183
181
184 import os
182 import os
185 import re
183 import re
@@ -4,7 +4,6 They should honor the line number argument, at least.
4
4
5 Contributions are *very* welcome.
5 Contributions are *very* welcome.
6 """
6 """
7 from __future__ import print_function
8
7
9 import os
8 import os
10 import pipes
9 import pipes
@@ -2,7 +2,6
2 """
2 """
3 GLUT Inputhook support functions
3 GLUT Inputhook support functions
4 """
4 """
5 from __future__ import print_function
6
5
7 #-----------------------------------------------------------------------------
6 #-----------------------------------------------------------------------------
8 # Copyright (C) 2008-2011 The IPython Development Team
7 # Copyright (C) 2008-2011 The IPython Development Team
@@ -77,7 +77,6 Inheritance diagram:
77 Portions (c) 2009 by Robert Kern.
77 Portions (c) 2009 by Robert Kern.
78 :license: BSD License.
78 :license: BSD License.
79 """
79 """
80 from __future__ import print_function
81 from contextlib import contextmanager
80 from contextlib import contextmanager
82 import sys
81 import sys
83 import types
82 import types
@@ -11,7 +11,6
11 #-----------------------------------------------------------------------------
11 #-----------------------------------------------------------------------------
12 # Imports
12 # Imports
13 #-----------------------------------------------------------------------------
13 #-----------------------------------------------------------------------------
14 from __future__ import print_function
15
14
16 # Stdlib imports
15 # Stdlib imports
17 import time
16 import time
@@ -12,7 +12,6
12 #-----------------------------------------------------------------------------
12 #-----------------------------------------------------------------------------
13 # Imports
13 # Imports
14 #-----------------------------------------------------------------------------
14 #-----------------------------------------------------------------------------
15 from __future__ import print_function
16 from tempfile import NamedTemporaryFile, mkdtemp
15 from tempfile import NamedTemporaryFile, mkdtemp
17 from os.path import split, join as pjoin, dirname
16 from os.path import split, join as pjoin, dirname
18
17
@@ -4,7 +4,6
4 # Copyright (c) IPython Development Team.
4 # Copyright (c) IPython Development Team.
5 # Distributed under the terms of the Modified BSD License.
5 # Distributed under the terms of the Modified BSD License.
6
6
7 from __future__ import print_function
8
7
9 from collections import Counter, defaultdict, deque, OrderedDict
8 from collections import Counter, defaultdict, deque, OrderedDict
10 import types, string
9 import types, string
@@ -119,7 +119,6 Authors
119 - VáclavŠmilauer <eudoxos-AT-arcig.cz>: Prompt generalizations.
119 - VáclavŠmilauer <eudoxos-AT-arcig.cz>: Prompt generalizations.
120 - Skipper Seabold, refactoring, cleanups, pure python addition
120 - Skipper Seabold, refactoring, cleanups, pure python addition
121 """
121 """
122 from __future__ import print_function
123
122
124 #-----------------------------------------------------------------------------
123 #-----------------------------------------------------------------------------
125 # Imports
124 # Imports
@@ -5,8 +5,6 An embedded IPython shell.
5 # Copyright (c) IPython Development Team.
5 # Copyright (c) IPython Development Team.
6 # Distributed under the terms of the Modified BSD License.
6 # Distributed under the terms of the Modified BSD License.
7
7
8 from __future__ import with_statement
9 from __future__ import print_function
10
8
11 import sys
9 import sys
12 import warnings
10 import warnings
@@ -1,5 +1,4
1 """IPython terminal interface using prompt_toolkit"""
1 """IPython terminal interface using prompt_toolkit"""
2 from __future__ import print_function
3
2
4 import os
3 import os
5 import sys
4 import sys
@@ -8,8 +8,6 line :command:`ipython` program.
8 # Copyright (c) IPython Development Team.
8 # Copyright (c) IPython Development Team.
9 # Distributed under the terms of the Modified BSD License.
9 # Distributed under the terms of the Modified BSD License.
10
10
11 from __future__ import absolute_import
12 from __future__ import print_function
13
11
14 import logging
12 import logging
15 import os
13 import os
@@ -3,7 +3,6
3 # Copyright (c) IPython Development Team.
3 # Copyright (c) IPython Development Team.
4 # Distributed under the terms of the Modified BSD License.
4 # Distributed under the terms of the Modified BSD License.
5
5
6 from __future__ import print_function
7
6
8 from logging import error
7 from logging import error