def _compile_main(self, dev_mode=False):
        if self.debug is None:
            debug = dev_mode
        else:
            debug = self.debug
        content = ''
        if not self.exclude_main_libs:
            content += _LOAD_PYJSLIB
        if self.main_module is not None:
            content += '\n\n'
            if debug:
                content += 'try {\n'
                content += '  try {\n'
                content += '    $pyjs.in_try_except += 1;\n    '
            content += 'pyjslib.___import___("%s", null, "__main__");' % self.main_module
            if debug:
                content += _HANDLE_EXCEPTIONS
        return content
dataset/ETHPy150Open adieu/django-mediagenerator/mediagenerator/filters/pyjs_filter.py/Pyjs._compile_main/original