Jump to content

Recommended Posts

Posted
Hi.
I'd like to get these installed, if possible:
urllib2
BeautifulSoup 4 (bs4)
lxml
rfc822
datetime

 

It will be a simple html parser for my personal use.

 

username: ktulxx

server: Tommy

Python 2.7.5

 

Thank you.

Posted

Thanks, Krydos. Works beautifully :)

Just wondering - why can't I see all the modules in the list by your link? rfc822, for instance, is not there.

Posted

The way the list works is by looking at what modules have been installed by pip. Here's the code

#!/bin/python

print("Content-Type: text/html\n\n")

import pip
installed_packages = pip.get_installed_distributions()
installed_packages_list = sorted(["<td>%s</td><td>%s</td>" % (i.key, i.version) for i in installed_packages])
print("Tommy /bin/python installed modules:<br><br>")
print("<table><tr><th align='left'>Module</th><th align='left'>Version</th></tr>")
print("</tr><tr>".join(installed_packages_list))
print("</tr></table>")
That list won't include the python standard libraries which weren't installed with pip: https://docs.python.org/2/library/index.html
  • Like 1
Guest
This topic is now closed to further replies.
×
×
  • Create New...