docs: show ifmain guard in example

This commit is contained in:
James R. Barlow
2020-11-03 15:28:33 -08:00
parent 13018d3d5c
commit 6d5f8133e0
+2 -1
View File
@@ -20,7 +20,8 @@ and largely have the same functions.
import ocrmypdf
ocrmypdf.ocr('input.pdf', 'output.pdf', deskew=True)
if __name__ == '__main__': # To ensure correct behavior on Windows
ocrmypdf.ocr('input.pdf', 'output.pdf', deskew=True)
With a few exceptions, all of the command line arguments are available
and may be passed as equivalent keywords.