プロファイルを作り、プロファイル毎に起動スクリプトを変えたりすると何かと便利。
プロファイルを作る
$ ipython profile create sample
[ProfileCreate] Generating default config file: u'/Users/taka84u9/.ipython/profile_sample/ipython_config.py'
$HOME/.ipython/profile_sample
ディレクトリに初期化されたプロファイルが作成される。
ipython_config.py
でipythonの設定をし、startup
ディレクトリの中身で起動スクリプトを作る。
プロファイルを読み込む
プロファイルを読み込んで起動するには--profile
オプションを使う
$ ipython --profile sample
Python 2.7.2 (default, Feb 16 2012, 15:37:03)
Type "copyright", "credits" or "license" for more information.
IPython 0.12 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
IPython profile: sample
In [1]: