##// END OF EJS Templates
Adding basic types (list, dict ,etc) to the sympy profile....
Brian E. Granger -
Show More
@@ -55,6 +55,10 b' def load_ipython_extension(ip):'
55 global _loaded
55 global _loaded
56 if not _loaded:
56 if not _loaded:
57 plaintext_formatter = ip.display_formatter.formatters['text/plain']
57 plaintext_formatter = ip.display_formatter.formatters['text/plain']
58
59 for cls in (object, tuple, list, set, frozenset, dict, str):
60 plaintext_formatter.for_type(cls, print_basic_unicode)
61
58 plaintext_formatter.for_type_by_name(
62 plaintext_formatter.for_type_by_name(
59 'sympy.core.basic', 'Basic', print_basic_unicode
63 'sympy.core.basic', 'Basic', print_basic_unicode
60 )
64 )
@@ -63,6 +67,7 b' def load_ipython_extension(ip):'
63 )
67 )
64
68
65 png_formatter = ip.display_formatter.formatters['image/png']
69 png_formatter = ip.display_formatter.formatters['image/png']
70
66 png_formatter.for_type_by_name(
71 png_formatter.for_type_by_name(
67 'sympy.core.basic', 'Basic', print_png
72 'sympy.core.basic', 'Basic', print_png
68 )
73 )
General Comments 0
You need to be logged in to leave comments. Login now