Show More
@@ -543,25 +543,27 b' python-profiler package from non-free.""")' | |||
|
543 | 543 | # every single object ever created. |
|
544 | 544 | sys.modules[main_mod_name] = main_mod |
|
545 | 545 | |
|
546 | try: | |
|
547 | stats = None | |
|
548 | with self.shell.readline_no_record: | |
|
549 | if 'p' in opts: | |
|
546 | if 'p' in opts or 'd' in opts: | |
|
550 | 547 |
|
|
551 | 548 |
|
|
552 |
|
|
|
549 | code_ns = { | |
|
553 | 550 |
|
|
554 | 551 |
|
|
555 | 552 |
|
|
556 | 553 |
|
|
557 | 554 |
|
|
558 | 555 |
|
|
559 |
|
|
|
556 | code_ns = { | |
|
560 | 557 |
|
|
561 | 558 |
|
|
562 | 559 |
|
|
563 | 560 |
|
|
564 | stats = self.prun('', code, False, opts, namespace=prun_ns) | |
|
561 | ||
|
562 | try: | |
|
563 | stats = None | |
|
564 | with self.shell.readline_no_record: | |
|
565 | if 'p' in opts: | |
|
566 | stats = self.prun('', code, False, opts, namespace=code_ns) | |
|
565 | 567 | else: |
|
566 | 568 | if 'd' in opts: |
|
567 | 569 | deb = debugger.Pdb(self.shell.colors) |
@@ -596,11 +598,10 b' python-profiler package from non-free.""")' | |||
|
596 | 598 | # Start file run |
|
597 | 599 | print "NOTE: Enter 'c' at the", |
|
598 | 600 | print "%s prompt to start your script." % deb.prompt |
|
599 | ns = {'execfile': py3compat.execfile, 'prog_ns': prog_ns} | |
|
600 | 601 | try: |
|
601 | 602 | #save filename so it can be used by methods on the deb object |
|
602 | 603 | deb._exec_filename = filename |
|
603 |
deb.run( |
|
|
604 | deb.run(code, code_ns) | |
|
604 | 605 | |
|
605 | 606 | except: |
|
606 | 607 | etype, value, tb = sys.exc_info() |
General Comments 0
You need to be logged in to leave comments.
Login now