conf

view ipython_config.py @ 375:26aed4e65671

cleanup hgrc a bit
author Alexander Solovyov <alexander@solovyov.net>
date Mon Jan 23 18:20:04 2012 +0200
parents 601fbbcd200b
children 8e1ed39cf032
line source
1 import site
2 import sys
3 from os import environ
4 from os.path import join
6 import IPython
8 c = get_config()
10 # c.TerminalIPythonApp.display_banner = False
11 c.TerminalIPythonApp.nosep = True
12 c.TerminalInteractiveShell.prompt_in1 = '\\C_Green>>\\C_LightGreen> '
13 c.TerminalInteractiveShell.prompt_in2 = '\\C_Green..\\C_LightGreen. '
14 c.TerminalInteractiveShell.prompt_out = ''
15 c.TerminalInteractiveShell.separate_in = ''
16 c.TerminalInteractiveShell.separate_out1 = ''
17 c.TerminalInteractiveShell.separate_out2 = ''
19 c.TerminalInteractiveShell.deep_reload = True
20 c.TerminalInteractiveShell.autocall = 1
21 c.TerminalInteractiveShell.confirm_exit = False
22 c.TerminalInteractiveShell.automagic = False
24 c.TerminalInteractiveShell.banner1 = "Py %s IPy %s\n" % (
25 sys.version.split('\n', 1)[0], IPython.__version__)
28 # virtualenv support
29 if 'VIRTUAL_ENV' in environ:
30 virtual_env = join(environ.get('VIRTUAL_ENV'),
31 'lib',
32 'python%d.%d' % sys.version_info[:2],
33 'site-packages')
35 # Remember original sys.path.
36 prev_sys_path = list(sys.path)
37 site.addsitedir(virtual_env)
39 # Reorder sys.path so new directories at the front.
40 new_sys_path = []
41 for item in list(sys.path):
42 if item not in prev_sys_path:
43 new_sys_path.append(item)
44 sys.path.remove(item)
45 sys.path[1:1] = new_sys_path
47 c.TerminalInteractiveShell.banner1 += 'virtualenv -> %s\n' % virtual_env
Repositories maintained by Alexander Solovyov