def _server_main(cls): cls._server_loop = loop = IOLoop() loop.make_current() cls._server_loop.add_callback(cls._start_evt.set) # Set environment variable os.environ['NBVIEWER_TEMPLATE_PATH'] = tmpl_fixture main(['', '--port=%d' % cls.port] + cls.get_server_args()) loop.close(all_fds=True)
def _server_main(cls): cls._server_loop = loop = IOLoop() loop.make_current() cls._server_loop.add_callback(cls._start_evt.set) main(['', '--port=%d' % cls.port] + cls.get_server_args()) loop.close(all_fds=True)
from nbviewer.app import main main()