|
|
|
|
@ -24,15 +24,9 @@
|
|
|
|
|
"This is made difficult by the fact that Notebooks are not plain Python files,\n",
|
|
|
|
|
"and thus cannot be imported by the regular Python machinery.\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"There is a flag in the notebook server that provides a certain workaround for a small set of cases,\n",
|
|
|
|
|
"but I think it's gross so I won't even discuss it.\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"Fortunately, Python provides some fairly sophisticated [hooks](http://www.python.org/dev/peps/pep-0302/) into the import machinery,\n",
|
|
|
|
|
"so we can actually make IPython notebooks importable without much difficulty,\n",
|
|
|
|
|
"and only using public APIs.\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"Forgive me if some of this is gross or wrong,\n",
|
|
|
|
|
"I haven't really written import hooks before."
|
|
|
|
|
"and only using public APIs."
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
|