##// END OF EJS Templates
change "profile not found" warning heuristics (only warn...
change "profile not found" warning heuristics (only warn if ipythonrc-PROFNAME and ipy_profile_PROFNAME not found)

File last commit:

r175:2101ac2c
r175:2101ac2c
Show More
ipy_user_conf.py
53 lines | 1.6 KiB | text/x-python | PythonLexer
vivainio
config changes
r130 """ User configuration file for IPython
This is a more flexible and safe way to configure ipython than *rc files
(ipythonrc, ipythonrc-pysh etc.)
This file is always imported on ipython startup. You should import all the
ipython extensions you need here (see IPython/Extensions directory).
vivainio
Changed startup message, and be a bit more conservative with the settings
r131 Feel free to edit this file to customize your ipython experience. If
you wish to only use the old config system, it's perfectly ok to make this file
empty.
vivainio
config changes
r130 """
vivainio
Changed startup message, and be a bit more conservative with the settings
r131 # Most of your config files and extensions will probably start with this import
vivainio
config changes
r130
vivainio
ipapi rehaul, moved api methods to class IPApi. Usage didn't change...
r146 from IPython import ipapi
ip = ipapi.get()
vivainio
rehashing now done by the config file alone - providing the system...
r132 import os
vivainio
config changes
r130
o = ip.options()
# autocall 1 ('smart') is default anyway, this is just an
# example on how to set an option
o.autocall = 1
if o.profile == 'pysh':
# Jason Orendorff's path class is handy to have in user namespace
# if you are doing shell-like stuff
vivainio
change "profile not found" warning heuristics (only warn...
r175 try:
ip.ex("from path import path" )
except ImportError:
pass
vivainio
config changes
r130
vivainio
Changed startup message, and be a bit more conservative with the settings
r131 # Uncomment these lines to get pysh-like prompt for all profiles.
vivainio
config changes
r130
vivainio
Changed startup message, and be a bit more conservative with the settings
r131 #o.prompt_in1= '\C_LightBlue[\C_LightCyan\Y1\C_LightBlue]\C_Green|\#> '
#o.prompt_in2= '\C_Green|\C_LightGreen\D\C_Green> '
#o.prompt_out= '<\#> '
vivainio
config changes
r130
# make 'd' an alias for ls -F
ip.magic('alias d ls -F --color=auto')
vivainio
rehashing now done by the config file alone - providing the system...
r132 # Make available all system commands through "rehashing" immediately.
# You can comment these lines out to speed up startup on very slow
vivainio
Made missing ipy_*_conf.py files less intrusive
r134 # machines, and to conserve a bit of memory. Note that pysh profile does this
# automatically
#if os.name=='posix':
# ip.magic('rehash')
#else:
# #slightly slower, but better results esp. with Windows
# ip.magic('rehashx')