Show More
@@ -1,27 +1,27 b'' | |||
|
1 | 1 | #!/usr/bin/env python |
|
2 | 2 | # -*- coding: utf-8 -*- |
|
3 | 3 | """IPython -- An enhanced Interactive Python |
|
4 | 4 | |
|
5 | 5 | This is just the startup wrapper script, kept deliberately to a minimum. |
|
6 | 6 | |
|
7 | 7 | The shell's mainloop() takes an optional argument, sys_exit (default=0). If |
|
8 | 8 | set to 1, it calls sys.exit() at exit time. You can use the following code in |
|
9 | 9 | your PYTHONSTARTUP file: |
|
10 | 10 | |
|
11 | 11 | import IPython |
|
12 | 12 | IPython.Shell.IPShell().mainloop(sys_exit=1) |
|
13 | 13 | |
|
14 | 14 | [or simply IPython.Shell.IPShell().mainloop(1) ] |
|
15 | 15 | |
|
16 | 16 | and IPython will be your working environment when you start python. The final |
|
17 | 17 | sys.exit() call will make python exit transparently when IPython finishes, so |
|
18 | 18 | you don't have an extra prompt to get out of. |
|
19 | 19 | |
|
20 | 20 | This is probably useful to developers who manage multiple Python versions and |
|
21 | 21 | don't want to have correspondingly multiple IPython versions. Note that in |
|
22 | 22 | this mode, there is no way to pass IPython any command-line options, as those |
|
23 | 23 | are trapped first by Python itself. |
|
24 | 24 | """ |
|
25 | 25 | |
|
26 | import IPython | |
|
26 | import IPython.Shell | |
|
27 | 27 | IPython.Shell.start().mainloop() |
General Comments 0
You need to be logged in to leave comments.
Login now