ipy_user_conf.py
43 lines
| 1.2 KiB
| text/x-python
|
PythonLexer
vivainio
|
r130 | """ User configuration file for IPython | ||
This is a more flexible and safe way to configure ipython than *rc files | ||||
(ipythonrc, ipythonrc-pysh etc.) | ||||
vivainio
|
r176 | This file is always imported on ipython startup. You can import the | ||
vivainio
|
r130 | ipython extensions you need here (see IPython/Extensions directory). | ||
vivainio
|
r176 | Feel free to edit this file to customize your ipython experience. | ||
Note that as such this file does nothing, for backwards compatibility. | ||||
vivainio
|
r195 | Consult e.g. file 'ipy_profile_sh.py' for an example of the things | ||
you can do here. | ||||
vivainio
|
r131 | |||
vivainio
|
r492 | See http://ipython.scipy.org/moin/IpythonExtensionApi for detailed | ||
description on what you could do here. | ||||
vivainio
|
r130 | """ | ||
vivainio
|
r131 | # Most of your config files and extensions will probably start with this import | ||
vivainio
|
r130 | |||
vivainio
|
r195 | import IPython.ipapi | ||
ip = IPython.ipapi.get() | ||||
vivainio
|
r176 | |||
vivainio
|
r205 | # You probably want to uncomment this if you did %upgrade -nolegacy | ||
fperez
|
r284 | # import ipy_defaults | ||
vivainio
|
r205 | |||
vivainio
|
r176 | def main(): | ||
vivainio
|
r403 | # Handy tab-completers for %cd, %run, import etc. | ||
# Try commenting this out if you have completion problems/slowness | ||||
vivainio
|
r507 | import ipy_stock_completers | ||
# uncomment if you want to get ipython -p sh behaviour | ||||
# without having to use command line switches | ||||
# import ipy_profile_sh | ||||
vivainio
|
r403 | |||
fperez
|
r284 | o = ip.options | ||
vivainio
|
r195 | # An example on how to set options | ||
#o.autocall = 1 | ||||
vivainio
|
r507 | o.system_verbose = 0 | ||
vivainio
|
r134 | |||
vivainio
|
r195 | main() | ||