##// END OF EJS Templates
Merge pull request #12619 from OdinTech3/master
Matthias Bussonnier -
r26101:219dea4d merge
parent child Browse files
Show More
@@ -39,6 +39,7 b' from IPython.utils.path import get_py_filename, shellglob'
39 39 from IPython.utils.timing import clock, clock2
40 40 from warnings import warn
41 41 from logging import error
42 from pathlib import Path
42 43 from io import StringIO
43 44 from pathlib import Path
44 45
@@ -360,17 +361,22 b' class ExecutionMagics(Magics):'
360 361 text_file = opts.T[0]
361 362 if dump_file:
362 363 prof.dump_stats(dump_file)
363 print('\n*** Profile stats marshalled to file',\
364 repr(dump_file)+'.',sys_exit)
364 print(
365 f"\n*** Profile stats marshalled to file {repr(dump_file)}.{sys_exit}"
366 )
365 367 if text_file:
366 Path(text_file).write_text(output)
367 print('\n*** Profile printout saved to text file',\
368 repr(text_file)+'.',sys_exit)
368 pfile = Path(text_file)
369 pfile.touch(exist_ok=True)
370 pfile.write_text(output)
371
372 print(
373 f"\n*** Profile printout saved to text file {repr(text_file)}.{sys_exit}"
374 )
369 375
370 376 if 'r' in opts:
371 377 return stats
372 else:
373 return None
378
379 return None
374 380
375 381 @line_magic
376 382 def pdb(self, parameter_s=''):
General Comments 0
You need to be logged in to leave comments. Login now