def get_lib_versions():
versions = {}
#PIL
try:
from PIL import Image
versions["PIL"] = Image.VERSION
except ImportError:
try:
import Image
versions["PIL"] = Image.VERSION
except ImportError:
versions["PIL"] = "Not found!"
#PLY
try:
from ply import lex
versions["PLY"] = lex.__version__
except ImportError:
versions["PLY"] = "Not found!"
return versions
评论列表
文章目录