Skip to content

Commit

Permalink
Merge pull request #483 from stefan6419846/patch-1
Browse files Browse the repository at this point in the history
Add debug logging for CLI arguments
  • Loading branch information
int3l committed Apr 8, 2023
2 parents 2035b7a + 5efdd1d commit 1ec07b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pytesseract/pytesseract.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
import logging
import re
import shlex
import string
Expand Down Expand Up @@ -37,6 +38,8 @@
if pandas_installed:
import pandas as pd

LOGGER = logging.getLogger('pytesseract')

DEFAULT_ENCODING = 'utf-8'
LANG_PATTERN = re.compile('^[a-z_]+$')
RGB_MODE = 'RGB'
Expand Down Expand Up @@ -250,6 +253,7 @@ def run_tesseract(

if extension and extension not in {'box', 'osd', 'tsv', 'xml'}:
cmd_args.append(extension)
LOGGER.debug('%r', cmd_args)

try:
proc = subprocess.Popen(cmd_args, **subprocess_args())
Expand Down

0 comments on commit 1ec07b1

Please sign in to comment.