How to reset IPython notebook file association

eryk sun eryksun at gmail.com
Sun Jun 26 12:19:52 EDT 2016


On Sat, Jun 25, 2016 at 11:00 AM, David Shi via Python-list
<python-list at python.org> wrote:
> I use IPython Notebook to do Python programming.
> I used "Open with" and set it with Google Chrome.  Then, my IPython notebook does not load properly.
> How can I reset IPython notebook file association, so that I can use it again?

nbopen opens a notebook in an existing notebook server or otherwise
starts a new server:

    https://github.com/takluyver/nbopen

Use the package's win-install.py script, which sets up the file
association for you. Optionally, if PyWin32 is installed, the script
calls SHChangeNotify to update Explorer. Example installation:

    > git clone https://github.com/takluyver/nbopen.git
    > cd nbopen
    > python win-install.py

I wouldn't have written the installation like this. I'd use setuptools
entry points and have a cross-platform registration script or
command-line option that honors Windows per-user and per-machine
installations, to be compatible with pip/wheel installation, instead
of requiring this awkward (per-user only) win-install script. Using an
entry-point EXE also works better with the "Open With" dialog, since
Windows otherwise takes the name/description from "python.exe". For
some reason, win-install also neglects to assign a DefaultIcon for the
file type. You can manually edit the file type in the registry to set
the icon.



More information about the Python-list mailing list