/usr/lib/python2.7/dist-packages/captcha/__init__.py is in python-django-captcha 0.5.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import re
VERSION = (0, 5, 1)
def get_version(svn=False):
"Returns the version as a human-format string."
return '.'.join([str(i) for i in VERSION])
def pillow_required():
def pil_version(version):
try:
return int(re.compile('[^\d]').sub('', version))
except:
return 116
try:
from PIL import Image, ImageDraw, ImageFont
except ImportError:
try:
import Image
import ImageDraw # NOQA
import ImageFont # NOQA
except ImportError:
return True
return pil_version(Image.VERSION) < 116
|