Show More
@@ -6,7 +6,7 b' Requires Python 2.3 or newer.' | |||||
6 |
|
6 | |||
7 | This file contains all the classes and helper functions specific to IPython. |
|
7 | This file contains all the classes and helper functions specific to IPython. | |
8 |
|
8 | |||
9 |
$Id: iplib.py 2 |
|
9 | $Id: iplib.py 2844 2007-10-24 14:34:18Z vivainio $ | |
10 | """ |
|
10 | """ | |
11 |
|
11 | |||
12 | #***************************************************************************** |
|
12 | #***************************************************************************** | |
@@ -1104,7 +1104,8 b' where you can customize many aspects of IPython\'s functionality in:\\n"""' | |||||
1104 | cfg = lambda d: os.path.join(d,rcdirend) |
|
1104 | cfg = lambda d: os.path.join(d,rcdirend) | |
1105 | try: |
|
1105 | try: | |
1106 | rcdir = filter(os.path.isdir,map(cfg,sys.path))[0] |
|
1106 | rcdir = filter(os.path.isdir,map(cfg,sys.path))[0] | |
1107 | except IOError: |
|
1107 | print "Initializing from configuration",rcdir | |
|
1108 | except IndexError: | |||
1108 | warning = """ |
|
1109 | warning = """ | |
1109 | Installation error. IPython's directory was not found. |
|
1110 | Installation error. IPython's directory was not found. | |
1110 |
|
1111 | |||
@@ -1114,10 +1115,21 b' The ipython/IPython directory should be in a directory belonging to your' | |||||
1114 | PYTHONPATH environment variable (that is, it should be in a directory |
|
1115 | PYTHONPATH environment variable (that is, it should be in a directory | |
1115 | belonging to sys.path). You can copy it explicitly there or just link to it. |
|
1116 | belonging to sys.path). You can copy it explicitly there or just link to it. | |
1116 |
|
1117 | |||
1117 | IPython will proceed with builtin defaults. |
|
1118 | IPython will create a minimal default configuration for you. | |
|
1119 | ||||
1118 | """ |
|
1120 | """ | |
1119 | warn(warning) |
|
1121 | warn(warning) | |
1120 | wait() |
|
1122 | wait() | |
|
1123 | ||||
|
1124 | if sys.platform =='win32': | |||
|
1125 | inif = 'ipythonrc.ini' | |||
|
1126 | else: | |||
|
1127 | inif = 'ipythonrc' | |||
|
1128 | minimal_setup = {'ipy_user_conf.py' : 'import ipy_defaults', inif : '# intentionally left blank' } | |||
|
1129 | os.makedirs(ipythondir) | |||
|
1130 | for f, cont in minimal_setup.items(): | |||
|
1131 | open(ipythondir + '/' + f,'w').write(cont) | |||
|
1132 | ||||
1121 | return |
|
1133 | return | |
1122 |
|
1134 | |||
1123 | if mode == 'install': |
|
1135 | if mode == 'install': |
@@ -1,3 +1,8 b'' | |||||
|
1 | 2007-10-24 Ville Vainio <vivainio@gmail.com> | |||
|
2 | ||||
|
3 | * iplib.py(user_setup): To route around buggy installations where | |||
|
4 | UserConfig is not available, create a minimal _ipython. | |||
|
5 | ||||
1 | 2007-10-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
6 | 2007-10-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
2 |
|
7 | |||
3 | * IPython/OInspect.py (Inspector.pinfo): fix bug that could arise |
|
8 | * IPython/OInspect.py (Inspector.pinfo): fix bug that could arise |
General Comments 0
You need to be logged in to leave comments.
Login now