<commit_before>from easyprocess import EasyProcess
from pyscreenshot.backendloader import BackendLoader
from PIL import Image
import logging
import tempfile
import sys

__version__ = '0.3.1'

log = logging.getLogger(__name__)
log.debug('version=' + __version__)


def _grab(to_file, childprocess=False, backend=None, bbox=None, filename=None):
    if childprocess:
        log.debug('running "%s" in child process' % backend)

        if not to_file:
            f = tempfile.NamedTemporaryFile(
                suffix='.png', prefix='pyscreenshot_childprocess_')
            filename = f.name

        params = ["'%s'" % (filename), 'childprocess=False']
        if backend:
            params += ["backend='%s'" % (backend)]
        params = ','.join(params)

        EasyProcess([sys.executable,
                     '-c',
                     "import pyscreenshot; pyscreenshot.grab_to_file(%s)" % (<commit_msg>version++<commit_after>from easyprocess import EasyProcess
from pyscreenshot.backendloader import BackendLoader
from PIL import Image
import logging
import tempfile
import sys

__version__ = '0.3.2'

log = logging.getLogger(__name__)
log.debug('version=' + __version__)


def _grab(to_file, childprocess=False, backend=None, bbox=None, filename=None):
    if childprocess:
        log.debug('running "%s" in child process' % backend)

        if not to_file:
            f = tempfile.NamedTemporaryFile(
                suffix='.png', prefix='pyscreenshot_childprocess_')
            filename = f.name

        params = ["'%s'" % (filename), 'childprocess=False']
        if backend:
            params += ["backend='%s'" % (backend)]
        params = ','.join(params)

        EasyProcess([sys.executable,
                     '-c',
                     "import pyscreenshot; pyscreenshot.grab_to_file(%s)" % (
{'fraction_non_alphanumeric': 0.12048192771084337, 'fraction_numerical': 0.0032858707557502738, 'mean_word_length': 2.782608695652174, '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': '628831', 'n_tokens_mistral': 544, 'n_tokens_neox': 536, 'n_words': 126}