don't mention profiles in nbextensions

This commit is contained in:
Min RK 2015-12-04 13:34:49 +01:00
parent 5bbab29286
commit dfc51fae35

View File

@ -119,10 +119,9 @@
},
"outputs": [],
"source": [
"import os.path\n",
"profile_dir = '~/.jupyter'\n",
"profile_dir = os.path.expanduser(profile_dir)\n",
"profile_dir"
"from jupyter_core.paths import jupyter_config_dir\n",
"jupyter_dir = jupyter_config_dir()\n",
"jupyter_dir"
]
},
{
@ -141,7 +140,7 @@
"outputs": [],
"source": [
"import os.path\n",
"custom_js_path = os.path.join(profile_dir,'custom','custom.js')"
"custom_js_path = os.path.join(jupyter_dir, 'custom', 'custom.js')"
]
},
{
@ -155,8 +154,7 @@
"# my custom js\n",
"if os.path.isfile(custom_js_path):\n",
" with open(custom_js_path) as f:\n",
" for l in f: \n",
" print(l)\n",
" print(f.read())\n",
"else:\n",
" print(\"You don't have a custom.js file\") "
]
@ -206,7 +204,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### For the quick ones : "
"### For the quick ones : "
]
},
{
@ -491,7 +489,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Try to wrap the all code in a file, put this file in `{profile}/static/custom/<a-name>.js`, and add \n",
"Try to wrap the all code in a file, put this file in `{jupyter_dir}/custom/<a-name>.js`, and add \n",
"\n",
"```\n",
"require(['custom/<a-name>']);\n",