Closed yymao closed 6 years ago
Thinking about it more, we could potentially start the browser or open a new tab the way jupyter notebooks do. The current implementation (manual redirect) is simple and straightforward, so I don't think this is a high-priority item.
@kadrlica thanks, can you try this again to see the browser thing works?
That worked for me (it took ~5s to load, which was strange).
@kadrlica which part tooks 5s? opening the browser or browser opening the page?
@yymao it was loading the page that took time. I just checked the most recent commit and it is lightning fast! However, when I closed and then re-ran it, it stalled loading the network image. When I killed it I got:
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 58585)
I've tried closing and re-running multiple times and this appears to be an unpredictable (but repeatable) event.
@kadrlica Thanks for testing. The "Exception happened..." was due to a bug in Python 2.7. It's harmless, but I have tried to remove it.
Some of the slowness or not loading pictures seem to be the issue of browser not cleaning up cache. Try pressing cmd
+ shift
+ R
to see if that helps.
I probably won't attempt to make this convenient function more sophisticated. I'm merging this now. Please open an issue there's something not usable.
This PR adds
server.py
to make starting a server easier.@kadrlica can you help testing this new way of starting a http server on a Mac? Thanks!