##// END OF EJS Templates
- correct recent argv fix, which was breaking tkinter
fperez -
Show More
@@ -6,7 +6,7 b' Requires Python 2.1 or better.'
6 6
7 7 This file contains the main make_IPython() starter function.
8 8
9 $Id: ipmaker.py 1329 2006-05-26 07:52:45Z fperez $"""
9 $Id: ipmaker.py 1330 2006-05-26 22:34:48Z fperez $"""
10 10
11 11 #*****************************************************************************
12 12 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
@@ -331,11 +331,6 b" object? -> Details about 'object'. ?object also works, ?? prints more."
331 331 mutex_opts(opts,[qw('log logfile'),qw('rcfile profile'),
332 332 qw('classic profile'),qw('classic rcfile')])
333 333
334 # Fix up sys.argv to omit the ipython call, for consistency with how
335 # Python itself operates (the inconsistency can break user scripts which
336 # rely on the Python behavior when run under ipython).
337 sys.argv[:] = sys.argv[1:]
338
339 334 #---------------------------------------------------------------------------
340 335 # Log replay
341 336
@@ -702,19 +697,20 b" object? -> Details about 'object'. ?object also works, ?? prints more."
702 697 # directly. This prevents triggering the IPython crash handler.
703 698 old_excepthook,sys.excepthook = sys.excepthook, IP.excepthook
704 699
705 save_argv = sys.argv[:] # save it for later restoring
700 save_argv = sys.argv[1:] # save it for later restoring
706 701
707 702 sys.argv = args
708
703
709 704 try:
710 705 IP.safe_execfile(args[0], IP.user_ns)
711 706 finally:
712 707 # Reset our crash handler in place
713 708 sys.excepthook = old_excepthook
714 sys.argv = save_argv
709 sys.argv[:] = save_argv
715 710 IP.user_ns['__name__'] = name_save
716 711
717 712 msg.user_exec.release_all()
713
718 714 if IP_rc.messages:
719 715 msg.summary += msg.user_exec.summary_all()
720 716
General Comments 0
You need to be logged in to leave comments. Login now