##// END OF EJS Templates
Add deprecation warnings for sympyprinting...
Sean Vig -
Show More
@@ -9,6 +9,11 b' Usage'
9 9 Once the extension is loaded, Sympy Basic objects are automatically
10 10 pretty-printed.
11 11
12 As of SymPy 0.7.2, maintenance of this extension has moved to SymPy under
13 sympy.interactive.ipythonprinting, any modifications to account for changes to
14 SymPy should be submitted to SymPy rather than changed here. This module is
15 maintained here for backwards compatablitiy with old SymPy versions.
16
12 17 """
13 18 #-----------------------------------------------------------------------------
14 19 # Copyright (C) 2008 The IPython Development Team
@@ -30,6 +35,8 b' try:'
30 35 except ImportError:
31 36 pass
32 37
38 import warnings
39
33 40 #-----------------------------------------------------------------------------
34 41 # Definitions of special display functions for use with IPython
35 42 #-----------------------------------------------------------------------------
@@ -101,6 +108,19 b' _loaded = False'
101 108 def load_ipython_extension(ip):
102 109 """Load the extension in IPython."""
103 110 import sympy
111
112 # sympyprinting extension has been moved to SymPy as of 0.7.2, if it
113 # exists there, warn the user and import it
114 try:
115 import sympy.interactive.ipythonprinting
116 except ImportError:
117 pass
118 else:
119 warnings.warn("The sympyprinting extension in IPython is deprecated, "
120 "use sympy.interactive.ipythonprinting")
121 ip.extension_manager.load_extension('sympy.interactive.ipythonprinting')
122 return
123
104 124 global _loaded
105 125 if not _loaded:
106 126 plaintext_formatter = ip.display_formatter.formatters['text/plain']
General Comments 0
You need to be logged in to leave comments. Login now