LoginSignup
17
17

More than 5 years have passed since last update.

ipythonで起動時のスクリプト実行

Last updated at Posted at 2014-11-02

pythonの対話型の実行環境として普段ipythonを使っているが,毎回起動時に

from re import *
from imp import *

等実行するので,これらは起動時したときに自動で実行するようにしたいなと思い,そのやり方を調べてみた.

起動時に実行したいスクリプト .ipython/profile_default/startup以下のディレクトリに配置すればOK.
恐らく.pyのファイルなら全て実行されそう.
ちなみに自分のwindowsの環境ではデフォルトの設定なので,C:\Users\{user_name}\.ipython/profile_default\startup\init.pyみたいにしておいた.細かいことだけど,案外便利そう

17
17
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
17
17