Exemple #1
0
#############################################################################
# Copyright (c) 2018, Voila Contributors                                    #
# Copyright (c) 2018, QuantStack                                            #
#                                                                           #
# Distributed under the terms of the BSD 3-Clause License.                  #
#                                                                           #
# The full license is in the file LICENSE, distributed with this software.  #
#############################################################################

if __name__ == "__main__":
    from voila.app import main
    main()
Exemple #2
0
# need to catch this case and start the kernel manually.

if 'ipykernel_launcher' in sys.argv:

    if sys.path[0] == '':
        del sys.path[0]

    from ipykernel import kernelapp as app
    app.launch_new_instance()

    sys.exit(0)

if 'voila' in sys.argv:

    from voila.app import main
    main(sys.argv[3:])

    sys.exit(0)

# We put all other imports below to minimize how many imports have to be
# done in the above case where the kernel is being launched.

from subprocess import Popen

import os
import time
import socket
from urllib.request import urlopen
from urllib.error import URLError, HTTPError

from voila.app import main