Source code for enamlnative.core.remotehooks

"""
Copyright (c) 2017, CodeLV.

Distributed under the terms of the MIT License.

The full license is in the file LICENSE, distributed with this software.

Created on Dec 11, 2017

@author jrm

"""
import os
import sys
import logging


[docs]def init(): sys.modules['nativehooks'] = sys.modules['enamlnative.core.remotehooks']
logging.basicConfig()
[docs]def log(msg): """ Normally the app's native hooks provides this method """
print(msg)
[docs]def publish(data): from enamlnative.core.dev import DevServerSession
DevServerSession.instance().write_message(data, True)