MCPcopy Create free account
hub / github.com/ipython/ipython / check_startup_dir

Method check_startup_dir

IPython/core/profiledir.py:110–120  ·  view source on GitHub ↗
(self, change=None)

Source from the content-addressed store, hash-verified

108
109 @observe('startup_dir')
110 def check_startup_dir(self, change=None):
111 self._mkdir(self.startup_dir)
112
113 readme = os.path.join(self.startup_dir, 'README')
114 src = os.path.join(get_ipython_package_dir(), u'core', u'profile', u'README_STARTUP')
115
116 if not os.path.exists(src):
117 self.log.warning("Could not copy README_STARTUP to startup dir. Source file %s does not exist.", src)
118
119 if os.path.exists(src) and not os.path.exists(readme):
120 shutil.copy(src, readme)
121
122 @observe('security_dir')
123 def check_security_dir(self, change=None):

Callers 1

check_dirsMethod · 0.95

Calls 3

_mkdirMethod · 0.95
get_ipython_package_dirFunction · 0.50
copyMethod · 0.45

Tested by

no test coverage detected