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

Wes Turner wes.turner at gmail.com
Thu Sep 10 20:00:43 EDT 2015


On Sep 10, 2015 3:06 PM, "MinRK" <benjaminrk at gmail.com> wrote:
>
> 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)
>

Is this doable with a setup.py and jupyter-pip?

https://github.com/jdfreder/jupyter-pip/

> -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
>>
>
>
> _______________________________________________
> 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/e9b7bd43/attachment.html>


More information about the IPython-dev mailing list