LoginSignup
3
6

More than 5 years have passed since last update.

IPythonのプロファイル機能を使う

Last updated at Posted at 2012-04-16

プロファイルを作り、プロファイル毎に起動スクリプトを変えたりすると何かと便利。

プロファイルを作る

$ 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]: 
3
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
6