##// END OF EJS Templates
reformat
Matthias Bussonnier -
Show More
@@ -185,14 +185,16 b' class BaseIPythonApplication(Application):'
185 get_ipython_package_dir(), u'config', u'profile', change['new']
185 get_ipython_package_dir(), u'config', u'profile', change['new']
186 )
186 )
187
187
188 add_ipython_dir_to_sys_path = Bool(False,
188 add_ipython_dir_to_sys_path = Bool(
189 False,
189 """Should the IPython profile directory be added to sys path ?
190 """Should the IPython profile directory be added to sys path ?
190
191
191 This option was non-existing before IPython 8.0, and ipython_dir was added to
192 This option was non-existing before IPython 8.0, and ipython_dir was added to
192 sys path to allow import of extensions present there. This was historical
193 sys path to allow import of extensions present there. This was historical
193 baggage from when pip did not exist. This now default to false,
194 baggage from when pip did not exist. This now default to false,
194 but can be set to true for legacy reasons.
195 but can be set to true for legacy reasons.
195 """).tag(config=True)
196 """,
197 ).tag(config=True)
196
198
197 ipython_dir = Unicode(
199 ipython_dir = Unicode(
198 help="""
200 help="""
@@ -307,11 +309,13 b' class BaseIPythonApplication(Application):'
307 str_path = os.path.abspath(new)
309 str_path = os.path.abspath(new)
308 sys.path.append(str_path)
310 sys.path.append(str_path)
309 ensure_dir_exists(new)
311 ensure_dir_exists(new)
310 readme = os.path.join(new, 'README')
312 readme = os.path.join(new, "README")
311 readme_src = os.path.join(get_ipython_package_dir(), u'config', u'profile', 'README')
313 readme_src = os.path.join(
314 get_ipython_package_dir(), "config", "profile", "README"
315 )
312 if not os.path.exists(readme) and os.path.exists(readme_src):
316 if not os.path.exists(readme) and os.path.exists(readme_src):
313 shutil.copy(readme_src, readme)
317 shutil.copy(readme_src, readme)
314 for d in ('extensions', 'nbextensions'):
318 for d in ("extensions", "nbextensions"):
315 path = os.path.join(new, d)
319 path = os.path.join(new, d)
316 try:
320 try:
317 ensure_dir_exists(path)
321 ensure_dir_exists(path)
General Comments 0
You need to be logged in to leave comments. Login now