##// END OF EJS Templates
add autoexec option
add autoexec option

File last commit:

r936:124c81f0
r936:124c81f0
Show More
ipy_user_conf.py
86 lines | 2.5 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.)
vivainio
easy_install ipython==dev works correctly now...
r176 This file is always imported on ipython startup. You can import the
vivainio
config changes
r130 ipython extensions you need here (see IPython/Extensions directory).
vivainio
easy_install ipython==dev works correctly now...
r176 Feel free to edit this file to customize your ipython experience.
Note that as such this file does nothing, for backwards compatibility.
vivainio
ipy_sane_defaults
r195 Consult e.g. file 'ipy_profile_sh.py' for an example of the things
you can do here.
vivainio
Changed startup message, and be a bit more conservative with the settings
r131
vivainio
david cournapeau patch from ticket \#107 (import_some fix). doc changes
r492 See http://ipython.scipy.org/moin/IpythonExtensionApi for detailed
description on what you could do here.
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
ipy_sane_defaults
r195 import IPython.ipapi
ip = IPython.ipapi.get()
vivainio
easy_install ipython==dev works correctly now...
r176
vivainio
%upgrade -nolegacy
r205 # You probably want to uncomment this if you did %upgrade -nolegacy
fperez
Defaults rename, clean up api to use properties or direct access rather than...
r284 # import ipy_defaults
vivainio
%upgrade -nolegacy
r205
vivainio
add some config helpers to ipy_user_conf.py
r808 import os
vivainio
add autoexec option
r936 def main():
vivainio
ipy_user_conf disables system_verbose as default
r507 # uncomment if you want to get ipython -p sh behaviour
vivainio
add autoexec option
r936 # without having to use command line switches
vivainio
ipy_user_conf disables system_verbose as default
r507 # import ipy_profile_sh
vivainio
add ipy_editors examples to ipy_user_conf.py
r844 # Configure your favourite editor?
# Good idea e.g. for %edit os.path.isfile
#import ipy_editors
vivainio
clarified comments in ipy_user_conf.py
r846
# Choose one of these:
vivainio
add ipy_editors examples to ipy_user_conf.py
r844 #ipy_editors.scite()
#ipy_editors.scite('c:/opt/scite/scite.exe')
#ipy_editors.komodo()
vivainio
add some preconfigured editors
r848 #ipy_editors.idle()
# ... or many others, try 'ipy_editors??' after import to see them
vivainio
clarified comments in ipy_user_conf.py
r846
# Or roll your own:
vivainio
add ipy_editors examples to ipy_user_conf.py
r844 #ipy_editors.install_editor("c:/opt/jed +$line $file")
fperez
Defaults rename, clean up api to use properties or direct access rather than...
r284 o = ip.options
vivainio
ipy_sane_defaults
r195 # An example on how to set options
#o.autocall = 1
vivainio
ipy_user_conf disables system_verbose as default
r507 o.system_verbose = 0
vivainio
add some config helpers to ipy_user_conf.py
r808
#import_all("os sys")
#execf('~/_ipython/ns.py')
vivainio
add autoexec option
r936
# -- prompt
fperez
- Add %logstop functionality to fully stop logger after turning it on....
r895 # A different, more compact set of prompts from the default ones, that
# always show your current location in the filesystem:
vivainio
add autoexec option
r936
fperez
- Add %logstop functionality to fully stop logger after turning it on....
r895 #o.prompt_in1 = r'\C_LightBlue[\C_LightCyan\Y2\C_LightBlue]\C_Normal\n\C_Green|\#>'
#o.prompt_in2 = r'.\D: '
#o.prompt_out = r'[\#] '
vivainio
add autoexec option
r936
# Try one of these color settings if you can't read the text easily
# autoexec is a list of IPython commands to execute on startup
#o.autoexec.append('%colors LightBG')
#o.autoexec.append('%colors NoColor')
#o.autoexec.append('%colors Linux')
vivainio
add some config helpers to ipy_user_conf.py
r808 # some config helper functions you can use
def import_all(modules):
""" Usage: import_all("os sys") """
for m in modules.split():
ip.ex("from %s import *" % m)
def execf(fname):
""" Execute a file in user namespace """
ip.ex('execfile("%s")' % os.path.expanduser(fname))
vivainio
Made missing ipy_*_conf.py files less intrusive
r134
vivainio
ipy_sane_defaults
r195 main()