2015-10-20 8 views

答えて

8

ipython_config.pyファイルに次の行を追加します。起動時?:で次のコマンドを実行しますqtconsole jupyterを作るための設定ファイルを変更する方法はあります(ないipython_qtconsole_config.pyファイル):あなたがc.InteractiveShellApp.exec_linesを設定することにより、()マジック%コマンドを含む起動時に実行するコマンドを指定することができ、あなたのipython_config.pyファイルで

c.InteractiveShellApp.matplotlib = 'inline' 
+1

恐ろしいです。私はipython_config.pyファイルで行うことができるすべてのカスタマイズを認識していませんでした。他の人がまだそのファイルを持っていない場合は、 'ipython profile create'を実行してください。 – snd

2

。例えば、

c.InteractiveShellApp.exec_lines = """ 
%matplotlib inline 
%autoreload 2 
import your_favorite_module 
""".split('\n') 
+1

'ipython_config.py'は、デフォルトで、ドキュメンテーションhttp://ipython.readthedocs.io/en/stable/development/config.htmlに従って' $ HOME/.ipython/profile_default/'の下にあります –

1

ファイルを開き~/.ipython/profile_default/ipython_config.py、および

c.InteractiveShellApp.code_to_run = '' 

==>

c.InteractiveShellApp.code_to_run = '%pylab inline' 
関連する問題