2017-08-22 11 views
4

私は起動スクリプトをJupyterに入れる方法を探しています。 IPythonでは、私はそれを$IPYTHON_DIR/profile_default/startup/の下に置きます。Jupyterにスタートアップスクリプトはどこに置くことができますか?

Jupyterでは、設定ファイルは$JUPYTER_CONFIG_DIR/jupyter_notebook_config.pyであるようです。しかし、カーネルの起動時に膨大なPythonライブラリをインポートする私のスタートアップファイルを使用したいと思います。

私はこのファイルをJupyterに置くことができますか?

答えて

0

あなたはjupyterのノートに、この経由して、デフォルトの起動スクリプトフォルダを取得することができます:私のWindows PC上で

get_ipython().profile_dir.startup_dir 

を、フォルダは次のとおりです。C:\Users\myusername\.ipython\profile_default\startup

そしてフォルダの下のREADMEファイルを読んでください。

Files will be run in lexicographical order, so you can control 
the execution order of files with a prefix, e.g.:: 

    00-first.py 
    50-middle.py 
    99-last.ipy 

したがって、00-xx.pyという名前のファイルをフォルダの下に置くことができます。

関連する問題