conf

view ipy_user_conf.py @ 375:26aed4e65671

cleanup hgrc a bit
author Alexander Solovyov <alexander@solovyov.net>
date Mon Jan 23 18:20:04 2012 +0200
parents 5360b48f8755
children
line source
1 """ User configuration file for IPython
2 (c) Alexander Solovyov 2007-2008
4 This config has input prompts like in usual python shell to avoid
5 confusion and simplification of doctest creation.
7 See http://ipython.scipy.org/moin/IpythonExtensionApi for detailed
8 description on what you could do here.
9 """
11 import os
12 import IPython.ipapi
13 ip = IPython.ipapi.get()
16 def execf(path):
17 ip.ex('execfile("%s")' % os.path.realpath(os.path.expanduser(path)))
20 def main():
21 import ipy_stock_completers
23 o = ip.options
24 o.autocall = 0
26 # My prompt, imitating usual python
27 o.prompt_in1 = '\\C_Green>>\\C_LightGreen> '
28 o.prompt_in2 = '\\C_Green..\\C_LightGreen. '
29 o.prompt_out = ''
31 # Remove all blank lines in between prompts
32 o.separate_in="0"
33 o.separate_out="0"
34 o.separate_out2="0"
36 # I like to keep my banner minimal.
37 from IPython import Release
38 import sys
39 o.banner = "Py %s IPy %s\n" % (sys.version.split('\n', 1)[0], Release.version)
41 o.confirm_exit = 0
42 try:
43 ip.ex("from ipy_addons import *")
44 except ImportError:
45 pass
46 try:
47 ip.ex("from ipipe import *")
48 except ImportError:
49 pass
51 execf('~/.ipython/ipyvenv.py')
53 main()
Repositories maintained by Alexander Solovyov