Updating sympy profile to match the exec_lines of isympy. #582

Merged
merged 2 commits into from Jul 18, 2011
@@ -8,9 +8,9 @@
lines = """
from __future__ import division
from sympy import *
-x, y, z = symbols('x,y,z')
-k, m, n = symbols('k,m,n', integer=True)
-f, g, h = map(Function, 'fgh')
+x, y, z, t = symbols('x y z t')
+k, m, n = symbols('k m n', integer=True)
+f, g, h = symbols('f g h', cls=Function)
"""
# You have to make sure that attributes that are containers already
@@ -55,6 +55,10 @@ def load_ipython_extension(ip):
global _loaded
if not _loaded:
plaintext_formatter = ip.display_formatter.formatters['text/plain']
+
+ for cls in (object, tuple, list, set, frozenset, dict, str):
+ plaintext_formatter.for_type(cls, print_basic_unicode)
+
plaintext_formatter.for_type_by_name(
'sympy.core.basic', 'Basic', print_basic_unicode
)
@@ -63,6 +67,7 @@ def load_ipython_extension(ip):
)
png_formatter = ip.display_formatter.formatters['image/png']
+
png_formatter.for_type_by_name(
'sympy.core.basic', 'Basic', print_png
)