bfirest1 Posted March 31, 2018 Posted March 31, 2018 (edited) Hello Helioids! Just found this service and started poking around. I'm glad HelioHost exists! Determining without command line access which python packages are available was a bit tricky. I'm documenting a solution here so it will show up for others in search. The following script is tested as working on server Johnny, under Python 3.6. Upload it to, for example, /home/USERNAME/public_html/cgi-bin/SCRIPTNAME.py. Don't forget to make it executable (chmod 755 SCRIPTNAME.py). Sending a request to that file from your browser, for example by visiting YOURSUBDOMAIN.heliohost.org/cgi-bin/SCRIPTNAME.py, will return installed module details wrapped in html that should be good enough for your browser to parse. Hope someone else finds this helpful! #!/usr/bin/python3.6 import sys import pip version = sys.version modules = pip.get_installed_distributions() print("Content-type: text/html\n\n", "Python ", version, "<br><br>") for mod in sorted(modules, key=lambda mod: mod.key): try: deets = next(pip.commands.show.search_packages_info([mod.key])) print(deets["name"], "<br>") print(deets["version"], "<br>") print(deets["summary"], "<br>") print(deets["author"], "<br>") print(deets["author-email"], "<br>") print(deets["home-page"], "<br><br>") except: print("<p>", mod.key, "</p>") Edited March 31, 2018 by bfirest1 1
qsgt Posted March 31, 2018 Posted March 31, 2018 (edited) One of Heliohost's Admin's Krydos already has a script to view the list of installed modules. The link to view installed modules for python version 3.6 is https://krydos2.heliohost.org/cgi-bin/modules37.py Similarly this link https://krydos2.heliohost.org/cgi-bin/modules27.py can be used to view the installed modules for python verision 2.7 qsgt Edited September 21, 2020 by Krydos Johnny has been upgraded to python 3.7
Bailey Posted March 31, 2018 Posted March 31, 2018 (edited) Hello, sorry you couldn't find these links earlier but these all show what packages are available on each version of Python on Tommy, Johnny and Ricky. Johnny: Python 3.7 Python 2.7 Tommy: Python 2.7 Python 3.7 Ricky: Python 3.6 Python 2.7 Edited September 21, 2020 by Krydos Johnny and Tommy have been upgraded to 3.7
Krydos Posted March 31, 2018 Posted March 31, 2018 Following the pattern https://krydos1.heliohost.org/cgi-bin/modules27.py https://krydos1.heliohost.org/cgi-bin/modules36.py
Bailey Posted March 31, 2018 Posted March 31, 2018 Ah okay, I got 404 errors. My post has been edited to show the changes
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now