0
我对如何保存ipython别名有点困惑,以至于每次打开ipython会话(首先保存别名后)并直接使用别名命令(在这一点上,您不应再次输入别名)。 例如,在Linux(或Windows)中使用ipython时,我会使用vi而不是!vi文件。如何永久保存ipython别名?
我对如何保存ipython别名有点困惑,以至于每次打开ipython会话(首先保存别名后)并直接使用别名命令(在这一点上,您不应再次输入别名)。 例如,在Linux(或Windows)中使用ipython时,我会使用vi而不是!vi文件。如何永久保存ipython别名?
vi fileneme
!vi filename
$ ipython profile create
#use find command in linux
find/-name ipython_config.py
#in window,you can use all kinds of tools to search .
#in commands line,you can use
ipython locate profile.
#in the directory,you can get it
c = get_config()
c.TerminalIPythonApp.display_banner = True
c.InteractiveShellApp.log_level = 20
c.InteractiveShellApp.extensions = []
c.InteractiveShellApp.exec_lines = []
c.InteractiveShellApp.exec_files = ['mycode.py']#load Module when open ipython
c.InteractiveShell.autoindent = True
c.InteractiveShell.colors = 'LightBG'#ipython console color
c.InteractiveShell.confirm_exit = False
c.InteractiveShell.editor = 'vim'#you can change your favorite editor
c.InteractiveShell.xmode = 'Context'
c.PrefilterManager.multi_line_specials = True
#you can add your alias in the fellowing list
c.AliasManager.user_aliases = [('vi','vim'),('py','python')('git','git'),]#i add git ,vim python .i really dislike "!"