Python modules

Add a reply

Posted by gnuvince 1473 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 1350 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.
Posted by 3n1gm4 1076 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.

Yes that not so fair. Anyway in python sqrt(n) == n**.5
Posted by 3n1gm4 1076 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.

Yes that not so fair. Anyway in python sqrt(n) == n**.5

Add a reply