<commit_before>"""Detect all Python scripts in HTML pages in current folder and subfolders.
Generate brython_modules.js, a bundle with all the modules and packages used
by an application.
Generate a Python package ready for installation and upload on PyPI.
"""


import os
import shutil
import html.parser
import json
import traceback
import sys
import time
import io
import tokenize
import token
import logging

logger = logging.getLoger(__name__)

# Template for application setup.py script
setup = """from setuptools import setup, find_packages

import os

if os.path.exists('README.rst'):
    with open('README.rst', encoding='utf-8') as fobj:
        LONG_DESCRIPTION = fobj.read()<commit_msg>Fix typo in list_modules.py getLogger() call<commit_after>"""Detect all Python scripts in HTML pages in current folder and subfolders.
Generate brython_modules.js, a bundle with all the modules and packages used
by an application.
Generate a Python package ready for installation and upload on PyPI.
"""


import os
import shutil
import html.parser
import json
import traceback
import sys
import time
import io
import tokenize
import token
import logging

logger = logging.getLogger(__name__)

# Template for application setup.py script
setup = """from setuptools import setup, find_packages

import os

if os.path.exists('README.rst'):
    with open('README.rst', encoding='utf-8') as fobj:
        LONG_DESCRIPTION = fobj.read()
{'fraction_non_alphanumeric': 0.07072829131652661, 'fraction_numerical': 0.0014005602240896359, 'mean_word_length': 4.8806584362139915, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2736194', 'n_tokens_mistral': 400, 'n_tokens_neox': 389, 'n_words': 170}