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 10 |
|
|
9 | $Id: ipmaker.py 1086 2006-01-27 16:02:38Z vivainio $""" | |
|
10 | 10 | |
|
11 | 11 | #***************************************************************************** |
|
12 | 12 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> |
@@ -661,16 +661,19 b" object? -> Details about 'object'. ?object also works, ?? prints more." | |||
|
661 | 661 | if not embedded and IP_rc.args: |
|
662 | 662 | name_save = IP.user_ns['__name__'] |
|
663 | 663 | IP.user_ns['__name__'] = '__main__' |
|
664 | try: | |
|
665 | 664 |
|
|
666 | 665 |
|
|
667 | 666 |
|
|
668 | for run in args: | |
|
669 | IP.safe_execfile(run,IP.user_ns) | |
|
667 | ||
|
668 | save_argv = sys.argv[:] # save it for later restoring | |
|
669 | sys.argv.pop(0) # the first arg is 'ipython' | |
|
670 | ||
|
671 | try: | |
|
672 | IP.safe_execfile(args[0], IP.user_ns) | |
|
670 | 673 | finally: |
|
671 | 674 | # Reset our crash handler in place |
|
672 | 675 | sys.excepthook = old_excepthook |
|
673 | ||
|
676 | sys.argv = save_argv | |
|
674 | 677 | IP.user_ns['__name__'] = name_save |
|
675 | 678 | |
|
676 | 679 | msg.user_exec.release_all() |
@@ -1,3 +1,10 b'' | |||
|
1 | 2006-01-27 Ville Vainio <vivainio@gmail.com> | |
|
2 | ||
|
3 | * ipmaker.py: Give "realistic" sys.argv for scripts (without | |
|
4 | 'ipython' at argv[0]) executed through command line. | |
|
5 | NOTE: this DEPRECATES calling ipython with multiple scripts | |
|
6 | ("ipython a.py b.py c.py") | |
|
7 | ||
|
1 | 8 | 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2 | 9 | |
|
3 | 10 | * IPython/demo.py (Demo.show): Flush stdout after each block, so |
General Comments 0
You need to be logged in to leave comments.
Login now