##// END OF EJS Templates
propagate deprecation of Formatter.plain_text_only
MinRK -
Show More
@@ -427,7 +427,7 b' Defaulting color scheme to \'NoColor\'"""'
427 save_dstore('rc_separate_out2',shell.separate_out2)
427 save_dstore('rc_separate_out2',shell.separate_out2)
428 save_dstore('rc_prompts_pad_left',pm.justify)
428 save_dstore('rc_prompts_pad_left',pm.justify)
429 save_dstore('rc_separate_in',shell.separate_in)
429 save_dstore('rc_separate_in',shell.separate_in)
430 save_dstore('rc_plain_text_only',disp_formatter.plain_text_only)
430 save_dstore('rc_active_types',disp_formatter.active_types)
431 save_dstore('prompt_templates',(pm.in_template, pm.in2_template, pm.out_template))
431 save_dstore('prompt_templates',(pm.in_template, pm.in2_template, pm.out_template))
432
432
433 if mode == False:
433 if mode == False:
@@ -444,7 +444,7 b' Defaulting color scheme to \'NoColor\'"""'
444 pm.justify = False
444 pm.justify = False
445
445
446 ptformatter.pprint = False
446 ptformatter.pprint = False
447 disp_formatter.plain_text_only = True
447 disp_formatter.active_types = ['text/plain']
448
448
449 shell.magic('xmode Plain')
449 shell.magic('xmode Plain')
450 else:
450 else:
@@ -459,7 +459,7 b' Defaulting color scheme to \'NoColor\'"""'
459 pm.justify = dstore.rc_prompts_pad_left
459 pm.justify = dstore.rc_prompts_pad_left
460
460
461 ptformatter.pprint = dstore.rc_pprint
461 ptformatter.pprint = dstore.rc_pprint
462 disp_formatter.plain_text_only = dstore.rc_plain_text_only
462 disp_formatter.active_types = dstore.rc_active_types
463
463
464 shell.magic('xmode ' + dstore.xmode)
464 shell.magic('xmode ' + dstore.xmode)
465
465
@@ -150,18 +150,18 b' class KernelMagics(Magics):'
150 # save a few values we'll need to recover later
150 # save a few values we'll need to recover later
151 mode = save_dstore('mode', False)
151 mode = save_dstore('mode', False)
152 save_dstore('rc_pprint', ptformatter.pprint)
152 save_dstore('rc_pprint', ptformatter.pprint)
153 save_dstore('rc_plain_text_only',disp_formatter.plain_text_only)
153 save_dstore('rc_active_types',disp_formatter.active_types)
154 save_dstore('xmode', shell.InteractiveTB.mode)
154 save_dstore('xmode', shell.InteractiveTB.mode)
155
155
156 if mode == False:
156 if mode == False:
157 # turn on
157 # turn on
158 ptformatter.pprint = False
158 ptformatter.pprint = False
159 disp_formatter.plain_text_only = True
159 disp_formatter.active_types = ['text/plain']
160 shell.magic('xmode Plain')
160 shell.magic('xmode Plain')
161 else:
161 else:
162 # turn off
162 # turn off
163 ptformatter.pprint = dstore.rc_pprint
163 ptformatter.pprint = dstore.rc_pprint
164 disp_formatter.plain_text_only = dstore.rc_plain_text_only
164 disp_formatter.active_types = dstore.rc_active_types
165 shell.magic("xmode " + dstore.xmode)
165 shell.magic("xmode " + dstore.xmode)
166
166
167 # Store new mode and inform on console
167 # Store new mode and inform on console
General Comments 0
You need to be logged in to leave comments. Login now