Create a profile dir by profile name and path. Parameters ---------- path : unicode The path (directory) to put the profile directory in. name : unicode The name of the profile. The name of the profile directory will be "profile_<
(cls, path, name=u'default', config=None)
| 163 | |
| 164 | @classmethod |
| 165 | def create_profile_dir_by_name(cls, path, name=u'default', config=None): |
| 166 | """Create a profile dir by profile name and path. |
| 167 | |
| 168 | Parameters |
| 169 | ---------- |
| 170 | path : unicode |
| 171 | The path (directory) to put the profile directory in. |
| 172 | name : unicode |
| 173 | The name of the profile. The name of the profile directory will |
| 174 | be "profile_<profile>". |
| 175 | """ |
| 176 | if not os.path.isdir(path): |
| 177 | raise ProfileDirError('Directory not found: %s' % path) |
| 178 | profile_dir = os.path.join(path, u'profile_' + name) |
| 179 | return cls(location=profile_dir, config=config) |
| 180 | |
| 181 | @classmethod |
| 182 | def find_profile_dir_by_name(cls, ipython_dir, name=u'default', config=None): |