def rst_to_html(rst_text):
    try:
        from docutils.core import publish_string
        bootstrap_css_path = os.path.join(sublime.packages_path(), 'RstPreview/css/bootstrap.min.css')
        base_css_path = os.path.join(sublime.packages_path(), 'RstPreview/css/base.css')
        args = {
            'stylesheet_path': ','.join([bootstrap_css_path, base_css_path]),
            'syntax_highlight': 'short'
        }
        return publish_string(rst_text, writer_name='html', settings_overrides=args)
    except __HOLE__:
        error_msg = """RstPreview requires docutils to be installed for the python interpreter that Sublime uses.
    run: `sudo easy_install-2.6 docutils` and restart Sublime (if on Mac OS X or Linux). For Windows check the docs at
    https://github.com/d0ugal/RstPreview"""

        sublime.error_message(error_msg)
        raise
dataset/ETHPy150Open d0ugal-archive/RstPreview/RstPreview.py/rst_to_html