/usr/lib/python2.7/dist-packages/openpyxl/xml/__init__.py is in python-openpyxl 2.4.9-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 | from __future__ import absolute_import
# Copyright (c) 2010-2017 openpyxl
"""Collection of XML resources compatible across different Python versions"""
import os
def lxml_available():
try:
from lxml.etree import LXML_VERSION
LXML = LXML_VERSION >= (3, 3, 1, 0)
if not LXML:
import warnings
warnings.warn("The installed version of lxml is too old to be used with openpyxl")
return False # we have it, but too old
else:
return True # we have it, and recent enough
except ImportError:
return False # we don't even have it
def lxml_env_set():
return os.environ.get("OPENPYXL_LXML", "True") == "True"
LXML = lxml_available() and lxml_env_set()
|