#-*- coding: utf-8 -*-
"""
@file
@brief Main file
"""
import os

__version__ = "0.5"
__author__ = "Xavier Dupré"
__github__ = "https://github.com/sdpython/code_beatrix"
__url__ = "http://lesenfantscodaient/"
__downloadUrl__ = "http://www.xavierdupre.fr/site2013/index_code.html#code_beatrix"
__license__ = "MIT License"
__blog__ = os.path.abspath(
    os.path.join(os.path.dirname(__file__), "rss_blog_list.xml"))


from .scratchs import check


def check(log=False):
    """
    Checks the library is working.
    It raises an exception.

    @param      log     if True, display information, otherwise
    @return             0 or exception
    """
    check()
    return True

try:
    from IPython import get_ipython
    from .ipythonhelper.magic_scratch import register_scratch_magics

    ip = get_ipython()
    if ip is not None:
        # the program is not run from a notebook
        register_scratch_magics()
except ImportError as e:
    # IPython is not installed
    pass

@@ -439,16 +439,567 @@
 check%0A%0A%0A
+def _setup_hook(add_print=False, unit_test=False):%0A    %22%22%22%0A    if this function is added to the module,%0A    the help automation and unit tests call it first before%0A    anything goes on as an initialization step.%0A    It should be run in a separate process.%0A%0A    @param      add_print       print *Success: _setup_hook*%0A    @param      unit_test       used only for unit testing purpose%0A    %22%22%22%0A    # we can check many things, needed module%0A    # any others things before unit tests are started%0A    if add_print:%0A        print(%22Success: _setup_hook%22)%0A%0A%0A
 def chec

update __init__.py