Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. machinename:~ username$ jupyter-notebook list
  2. http://localhost:8888 :: /Users/username/your/notebook/path
  3. http://localhost:8889 :: /Users/username/your/other/notebook/path
  4. ...
  5.  
  6. from notebook import notebookapp
  7. servers = list(notebookapp.list_running_servers())
  8. print servers
  9.  
  10. [{u'base_url': u'/',
  11. u'hostname': u'localhost',
  12. u'notebook_dir': u'/Users/username/your/notebook/path',
  13. u'pid':123,
  14. u'port': 8888,
  15. u'secure': False,
  16. u'url': u'http://localhost:8888/'},
  17. ...
  18. {u'base_url': u'/',
  19. u'hostname': u'localhost',
  20. u'notebook_dir': u'/Users/username/your/other/notebook/path',
  21. u'pid': 1234,
  22. u'port': 8889,
  23. u'secure': True,
  24. u'url': u'http://localhost:8889/'}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement