Browse files

Adding basic types (list, dict ,etc) to the sympy profile.

This brings the sympy profile into synch with isympy.
  • Loading branch information...
1 parent c7c711b commit 09b275ebbfdf5d85fa0e33ea9906b776f3d52f44 @ellisonbg committed Jul 18, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 IPython/extensions/sympyprinting.py
View
5 IPython/extensions/sympyprinting.py
@@ -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
)

0 comments on commit 09b275e

Please sign in to comment.