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)
| 184 | |
| 185 | @classmethod |
| 186 | def create_profile_dir_by_name(cls, path, name=u'default', config=None): |
| 187 | """Create a profile dir by profile name and path. |
| 188 | |
| 189 | Parameters |
| 190 | ---------- |
| 191 | path : unicode |
| 192 | The path (directory) to put the profile directory in. |
| 193 | name : unicode |
| 194 | The name of the profile. The name of the profile directory will |
| 195 | be "profile_<profile>". |
| 196 | """ |
| 197 | if not os.path.isdir(path): |
| 198 | raise ProfileDirError('Directory not found: %s' % path) |
| 199 | profile_dir = os.path.join(path, u'profile_' + name) |
| 200 | return cls(location=profile_dir, config=config) |
| 201 | |
| 202 | @classmethod |
| 203 | def find_profile_dir_by_name(cls, ipython_dir, name=u'default', config=None): |