##// END OF EJS Templates
add README to startup dir
MinRK -
Show More
@@ -0,0 +1,11 b''
1 This is the IPython startup directory
2
3 .py and .ipy files in this directory will be run *prior* to any code or files specified
4 via the exec_lines or exec_files configurables whenever you load this profile.
5
6 Files will be run in lexicographical order, so you can control the execution order of files
7 with a prefix, e.g.::
8
9 00-first.py
10 50-middle.py
11 99-last.ipy
@@ -100,6 +100,10 b' class ProfileDir(LoggingConfigurable):'
100 def check_startup_dir(self):
100 def check_startup_dir(self):
101 if not os.path.isdir(self.startup_dir):
101 if not os.path.isdir(self.startup_dir):
102 os.mkdir(self.startup_dir)
102 os.mkdir(self.startup_dir)
103 readme = os.path.join(self.startup_dir, 'README')
104 src = os.path.join(get_ipython_package_dir(), u'config', u'profile', u'README_STARTUP')
105 if not os.path.exists(readme):
106 shutil.copy(src, readme)
103
107
104 def _security_dir_changed(self, name, old, new):
108 def _security_dir_changed(self, name, old, new):
105 self.check_security_dir()
109 self.check_security_dir()
@@ -129,6 +133,7 b' class ProfileDir(LoggingConfigurable):'
129 self.check_security_dir()
133 self.check_security_dir()
130 self.check_log_dir()
134 self.check_log_dir()
131 self.check_pid_dir()
135 self.check_pid_dir()
136 self.check_startup_dir()
132
137
133 def copy_config_file(self, config_file, path=None, overwrite=False):
138 def copy_config_file(self, config_file, path=None, overwrite=False):
134 """Copy a default config file into the active profile directory.
139 """Copy a default config file into the active profile directory.
@@ -132,7 +132,7 b' def find_package_data():'
132 static_data.append(os.path.join(parent, f))
132 static_data.append(os.path.join(parent, f))
133
133
134 package_data = {
134 package_data = {
135 'IPython.config.profile' : ['README', '*/*.py'],
135 'IPython.config.profile' : ['README*', '*/*.py'],
136 'IPython.testing' : ['*.txt'],
136 'IPython.testing' : ['*.txt'],
137 'IPython.frontend.html.notebook' : ['templates/*'] + static_data,
137 'IPython.frontend.html.notebook' : ['templates/*'] + static_data,
138 'IPython.frontend.qt.console' : ['resources/icon/*.svg'],
138 'IPython.frontend.qt.console' : ['resources/icon/*.svg'],
General Comments 0
You need to be logged in to leave comments. Login now