1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-30 20:06:07 +00:00
mobilizon/priv/python/module.py
Thomas Citharel 0c667b13ae
Export participants to different formats
* CSV
* PDF (requires Python dependency `weasyprint`)
* ODS (requires Python dependency `pyexcel_ods3`)

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-10-05 10:52:55 +02:00

8 lines
No EOL
208 B
Python

import pkg_resources
def has_package(package):
try:
pkg_resources.get_distribution(package.decode('ascii'))
return True
except pkg_resources.DistributionNotFound:
return False