main.py (7445:dfd04ffc1773) main.py (7458:72af7f65f117)
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 346 unchanged lines hidden (view full) ---

355 while t.tb_next is not None:
356 t = t.tb_next
357 pdb.interaction(t.tb_frame,t)
358 else:
359 exec filecode in scope
360
361 # once the script is done
362 if options.interactive:
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 346 unchanged lines hidden (view full) ---

355 while t.tb_next is not None:
356 t = t.tb_next
357 pdb.interaction(t.tb_frame,t)
358 else:
359 exec filecode in scope
360
361 # once the script is done
362 if options.interactive:
363 interact = code.InteractiveConsole(scope)
364 interact.interact("M5 Interactive Console")
363 banner = "M5 Interactive Console"
364 try:
365 from IPython.Shell import IPShellEmbed
366 ipshell = IPShellEmbed(banner=banner,user_ns=scope)
367 ipshell()
368 except ImportError:
369 code.InteractiveConsole(scope).interact(banner)
365
366if __name__ == '__main__':
367 from pprint import pprint
368
369 print 'opts:'
370 pprint(options, indent=4)
371 print
372
373 print 'args:'
374 pprint(arguments, indent=4)
370
371if __name__ == '__main__':
372 from pprint import pprint
373
374 print 'opts:'
375 pprint(options, indent=4)
376 print
377
378 print 'args:'
379 pprint(arguments, indent=4)