[IPython-dev] Best way to get the path to the static directory

MinRK benjaminrk at gmail.com
Thu Sep 10 16:06:09 EDT 2015


>From a Python API, custom.{js|css} live in
jupyter_core.paths.jupyter_config_dir()
+ '/custom'. Note that you probably shouldn’t be putting any files in there
- if you are writing javascript extensions, they should be placed in
nbextensions via

jupyter nbextension install (4.x) or
ipython install-nbextension (3.x)

-MinRK
​

On Thu, Sep 10, 2015 at 9:05 PM, Thorin Tabor <tabor at broadinstitute.org>
wrote:

> When writing a Jupyter notebook extension for Jupyter 4, what is the
> recommended way to get the path to the static directory (you know, the one
> where custom.js and custom.css are being served from)?
>
> In Jupyter 3.x, you used to be able to reference...
>
> IPython.utils.path.locate_profile() + '/static'
>
> ...but that no longer seems to suffice. I know that...
>
> notebook.notebookapp.DEFAULT_STATIC_FILES_PATH
>
> looks like it might work, but it seems like there ought to be a better
> way. Does anyone have a recommendation?
>
> Thorin
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150910/ad703fee/attachment.html>


More information about the IPython-dev mailing list