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 | 100 | def check_startup_dir(self): |
|
101 | 101 | if not os.path.isdir(self.startup_dir): |
|
102 | 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 | 108 | def _security_dir_changed(self, name, old, new): |
|
105 | 109 | self.check_security_dir() |
@@ -129,6 +133,7 b' class ProfileDir(LoggingConfigurable):' | |||
|
129 | 133 | self.check_security_dir() |
|
130 | 134 | self.check_log_dir() |
|
131 | 135 | self.check_pid_dir() |
|
136 | self.check_startup_dir() | |
|
132 | 137 | |
|
133 | 138 | def copy_config_file(self, config_file, path=None, overwrite=False): |
|
134 | 139 | """Copy a default config file into the active profile directory. |
@@ -132,7 +132,7 b' def find_package_data():' | |||
|
132 | 132 | static_data.append(os.path.join(parent, f)) |
|
133 | 133 | |
|
134 | 134 | package_data = { |
|
135 | 'IPython.config.profile' : ['README', '*/*.py'], | |
|
135 | 'IPython.config.profile' : ['README*', '*/*.py'], | |
|
136 | 136 | 'IPython.testing' : ['*.txt'], |
|
137 | 137 | 'IPython.frontend.html.notebook' : ['templates/*'] + static_data, |
|
138 | 138 | 'IPython.frontend.qt.console' : ['resources/icon/*.svg'], |
General Comments 0
You need to be logged in to leave comments.
Login now