예제 #1
0
import sys, os
import blaze
from blaze.io.server.app import app

if len(sys.argv) > 1:
    cat_path = sys.argv[1]
else:
    cat_path = os.path.join(os.getcwd(), 'sample_arrays.yaml')

# Load the sample catalog, or from the selected path
blaze.catalog.load_config(cat_path)
print('Starting Blaze Server')
app.run(debug=True, port=8080, use_reloader=True)
예제 #2
0
import sys, os
import blaze
from blaze.io.server.app import app

if len(sys.argv) > 1:
    cat_path = sys.argv[1]
else:
    cat_path = os.path.join(os.getcwdu(), 'sample_arrays.yaml')

# Load the sample catalog, or from the selected path
blaze.catalog.load_config(cat_path)
print('Starting Blaze Server')
app.run(debug=True, port=8080, use_reloader=True)
예제 #3
0
"""
Starts a Blaze server for tests.

$ start_test_server.py /path/to/catalog_config.yaml <portnumber>
"""
import sys, os
import blaze
from blaze.io.server.app import app

blaze.catalog.load_config(sys.argv[1])
app.run(port=int(sys.argv[2]), use_reloader=False)
예제 #4
0
import sys
import os

if os.name == 'nt':
    old_excepthook = sys.excepthook

    # Exclude this from our autogenerated API docs.
    undoc = lambda func: func

    @undoc
    def gui_excepthook(exctype, value, tb):
        try:
            import ctypes, traceback
            MB_ICONERROR = 0x00000010
            title = u'Error starting test Blaze server'
            msg = u''.join(traceback.format_exception(exctype, value, tb))
            ctypes.windll.user32.MessageBoxW(0, msg, title, MB_ICONERROR)
        finally:
            # Also call the old exception hook to let it do
            # its thing too.
            old_excepthook(exctype, value, tb)

    sys.excepthook = gui_excepthook

import blaze
from blaze.io.server.app import app

blaze.catalog.load_config(sys.argv[1])
app.run(port=int(sys.argv[2]), use_reloader=False)