Coder Social home page Coder Social logo

Comments (4)

takluyver avatar takluyver commented on August 19, 2024

It checks whether the any running server was started in a path that's a prefix of the current notebook path. E.g. if I have a server running in /home/thomas and I try to open /home/thomas/foo/bar.ipynb, it will use the existing server. But if I try to open /opt/baz.ipynb, it will start a new server.

from nbopen.

den-run-ai avatar den-run-ai commented on August 19, 2024

Well, I got an error on Windows this afternoon, but this is working on
Linux. Let me check tomorrow morning again. Maybe my mistake with the paths
or something.

On Tue, Nov 15, 2016 at 12:05 AM, Thomas Kluyver [email protected]
wrote:

It checks whether the any running server was started in a path that's a
prefix of the current notebook path. E.g. if I have a server running in
/home/thomas and I try to open /home/thomas/foo/bar.ipynb, it will use
the existing server. But if I try to open /opt/baz.ipynb, it will start a
new server.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#38 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHgZ5ZPg30z-Gfj00mdae39424-oRBDqks5q-UuxgaJpZM4KyI0I
.

from nbopen.

takluyver avatar takluyver commented on August 19, 2024

There may be a bug because I'm used to case-sensitive Linux paths, and Windows paths are case-insensitive.

from nbopen.

den-run-ai avatar den-run-ai commented on August 19, 2024

I spent quite some time debugging and fixing this problem only to find this pull request which fixes the issue in the master:

#42

My solution is based on notebookapp, but is essentially the same:

        relpath = os.path.relpath(filename, start=server_inf['notebook_dir'])
        # based on "start" method in notebookapp
        uri = url_escape(url_path_join('notebooks', *relpath.split(os.sep)))
        url = url_path_join(server_inf['url'], uri)

from nbopen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.