コード例 #1
0
def stop():
    ioloop = tornado.ioloop.IOLoop.instance()
    ioloop.add_callback(ioloop.stop)


if __name__ == "__main__":
    import tornado

    from application.application import Application
    from application.controller.plugins_controller import PluginsController
    from webservice.webservice import WebService

    application = Application(path_data="wstest/data/",
                              address='localhost',
                              test=True)
    application.register(WebService(application, 3000))

    application.start()
    controller = application.controller(PluginsController)

    for plugin_uri in controller.lv2_builder.plugins:
        print(plugin_uri)

    from _thread import start_new_thread
    start_new_thread(test_thread, ())
    tornado.ioloop.IOLoop.current().start()

    application.stop()

    sys.exit(EXIT_STATUS)
コード例 #2
0
# Copyright 2017 SrMouraSilva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from application.application import Application
from raspberry_p0.raspberry_p0 import RaspberryP0

application = Application(path_data="data/", address='localhost', test=True)

p0 = RaspberryP0(application, configuration_file='config_test.ini')

application.register(p0)
application.start()

application.stop()
コード例 #3
0
ファイル: config.py プロジェクト: PedalPi/WebService

def stop():
    ioloop = tornado.ioloop.IOLoop.instance()
    ioloop.add_callback(ioloop.stop)

if __name__ == "__main__":
    import tornado

    from application.application import Application
    from application.controller.plugins_controller import PluginsController
    from webservice.webservice import WebService


    application = Application(path_data="wstest/data/", address='localhost', test=True)
    application.register(WebService(application, 3000))

    application.start()
    controller = application.controller(PluginsController)

    for plugin_uri in controller.lv2_builder.plugins:
        print(plugin_uri)

    from _thread import start_new_thread
    start_new_thread(test_thread, ())
    tornado.ioloop.IOLoop.current().start()

    application.stop()

    sys.exit(EXIT_STATUS)