Read ipython user config

This commit is contained in:
Kovid Goyal 2018-01-28 10:34:38 +05:30
parent 39931615d1
commit a09a45732c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -187,6 +187,9 @@ def ipython(user_ns=None):
defns.update(user_ns or {}) defns.update(user_ns or {})
c = Config() c = Config()
user_conf = os.path.expanduser('~/.ipython/profile_default/ipython_config.py')
if os.path.exists(user_conf):
execfile(user_conf, {'get_config': lambda: c})
c.TerminalInteractiveShell.prompts_class = CustomPrompt c.TerminalInteractiveShell.prompts_class = CustomPrompt
c.InteractiveShellApp.exec_lines = [ c.InteractiveShellApp.exec_lines = [
'from __future__ import division, absolute_import, unicode_literals, print_function', 'from __future__ import division, absolute_import, unicode_literals, print_function',