Skip to content

Commit

Permalink
added get_installed_packages()
Browse files Browse the repository at this point in the history
  • Loading branch information
drfho committed Feb 15, 2021
1 parent cfec4d5 commit d3044e0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Products/zms/standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,16 @@ def set_response_headers_cache(context, request=None, cache_max_age=24*3600):
return None


security.declarePublic('get_installed_packages')
def get_installed_packages():
import subprocess
pipfreeze = subprocess.Popen("../../../bin/pip freeze --all",
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
shell=True, cwd=getPACKAGE_HOME(), universal_newlines=True)
packages = pipfreeze.communicate()[0].strip()
return packages


security.declarePublic('umlaut_quote')
def umlaut_quote(s, mapping={}):
"""
Expand Down

0 comments on commit d3044e0

Please sign in to comment.