From 9f1f29dd8d75b80e844a9635b321e95ed3c39e4d Mon Sep 17 00:00:00 2001 From: Reedy Date: Fri, 19 Jul 2024 16:55:00 +0100 Subject: [PATCH] captcha.py: Simplify and sort import statements Change-Id: Iaf968a4d69dba0550c8580b09e8029fee7b5fa94 --- captcha.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/captcha.py b/captcha.py index 904f25907..7c9bed478 100644 --- a/captcha.py +++ b/captcha.py @@ -25,22 +25,18 @@ # Tweaks by Greg Sabino Mullane : # 2008-01-06: Add regex check to skip words containing other than a-z -import random -import math -import hashlib from optparse import OptionParser -import os -import sys -import re -import multiprocessing +import hashlib import json +import math +import multiprocessing +import os +import random +import re +import sys try: - from PIL import Image - from PIL import ImageFont - from PIL import ImageDraw - from PIL import ImageEnhance - from PIL import ImageOps + from PIL import Image, ImageDraw, ImageEnhance, ImageFont, ImageOps except ImportError: sys.exit( "This script requires the Python Imaging Library - http://www.pythonware.com/products/pil/"