Copy a default config file into the active profile directory. Default configuration files are kept in :mod:`IPython.core.profile`. This function moves these from that location to the working profile directory.
(self, config_file, path=None, overwrite=False)
| 134 | self.check_startup_dir() |
| 135 | |
| 136 | def copy_config_file(self, config_file, path=None, overwrite=False): |
| 137 | """Copy a default config file into the active profile directory. |
| 138 | |
| 139 | Default configuration files are kept in :mod:`IPython.core.profile`. |
| 140 | This function moves these from that location to the working profile |
| 141 | directory. |
| 142 | """ |
| 143 | dst = os.path.join(self.location, config_file) |
| 144 | if os.path.isfile(dst) and not overwrite: |
| 145 | return False |
| 146 | if path is None: |
| 147 | path = os.path.join(get_ipython_package_dir(), u'core', u'profile', u'default') |
| 148 | src = os.path.join(path, config_file) |
| 149 | shutil.copy(src, dst) |
| 150 | return True |
| 151 | |
| 152 | @classmethod |
| 153 | def create_profile_dir(cls, profile_dir, config=None): |
no test coverage detected