Python modules

Add a reply

Posted by gnuvince 255 days ago:
What is the EXACT list of Python modules that can be imported? So far, I know the following are *unavailable*: os, math (WTF?), time, datetime. Considering that the users of Perl and PHP have things like sqrt() directly in their global namespace, it seems quite unfair that Python programmers need to rewrite their own.
Posted by hallvabo 131 days ago:
I wrote a small test program to check the availability of modules and encodings, and submitted it. Here are the results:


MODULES

Available: sys, os, re, codecs
Not available: random, math, decimal, array, time, datetime, zlib, itertools, hashlib, operator, sha, urllib, zipfile, bz2
Go to the Module Index for a list of python modules.


ENCODINGS

Available: ascii, iso-8859-1, utf_7, utf_8, utf_16, punycode, rot13
Not available: base64, hex, bz2, uu, zlib
Go to Standard Encodings in the Python docs for a comprehensive list of possible encodings.


If anybody is interested, I can post the source to the checking tool.

Add a reply