Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Select default profile according to Python version.

  • Loading branch information...
commit 4408c4cb9f476370d7208fa08141b84c3ba19368 1 parent c165f2e
@takluyver authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 IPython/core/
8 IPython/core/
@@ -40,6 +40,7 @@
from IPython.core.profiledir import ProfileDir, ProfileDirError
from IPython.utils.path import get_ipython_dir, get_ipython_package_dir
from IPython.utils.traitlets import List, Unicode, Type, Bool, Dict
+from IPython.utils import py3compat
# Classes and functions
@@ -102,9 +103,12 @@ def _config_file_name_changed(self, name, old, new):
def _config_file_paths_default(self):
return [os.getcwdu()]
- profile = Unicode(u'default', config=True,
+ profile = Unicode(u'', config=True,
help="""The IPython profile to use."""
+ def _profile_default(self):
+ return "python3" if py3compat.PY3 else "default"
def _profile_changed(self, name, old, new):
self.builtin_profile_dir = os.path.join(
get_ipython_package_dir(), u'config', u'profile', new
@@ -222,7 +226,7 @@ def init_profile_dir(self):
p = ProfileDir.find_profile_dir_by_name(self.ipython_dir, self.profile, self.config)
except ProfileDirError:
# not found, maybe create it (always create default profile)
- if self.auto_create or self.profile=='default':
+ if self.auto_create or self.profile==self._profile_default():
p = ProfileDir.create_profile_dir_by_name(self.ipython_dir, self.profile, self.config)
except ProfileDirError:
Please sign in to comment.
Something went wrong with that request. Please try again.