diff --git a/Lib/poplib.py b/Lib/poplib.py index c67cbc67644..fb24a0f9c5b 100644 --- a/Lib/poplib.py +++ b/Lib/poplib.py @@ -14,6 +14,8 @@ Based on the J. Myers POP3 draft, Jan. 96 import re, socket +__all__ = ["POP3","error_proto"] + # Exception raised when an error or invalid response is received: class error_proto(Exception): pass diff --git a/Lib/posixfile.py b/Lib/posixfile.py index 58c4b4f5f89..da374ad9a99 100644 --- a/Lib/posixfile.py +++ b/Lib/posixfile.py @@ -53,6 +53,8 @@ f.lock(mode [, len [, start [, whence]]]) query only """ +__all__ = ["open","fileopen","SEEK_SET","SEEK_CUR","SEEK_END"] + class _posixfile_: """File wrapper class that provides extra POSIX file routines.""" diff --git a/Lib/posixpath.py b/Lib/posixpath.py index 2d18f5d47ab..223d6ba3229 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -13,6 +13,11 @@ for manipulation of the pathname component of URLs. import os import stat +__all__ = ["normcase","isabs","join","splitdrive","split","splitext", + "basename","dirname","commonprefix","getsize","getmtime", + "getatime","islink","exists","isdir","isfile","ismount", + "walk","expanduser","expandvars","normpath","abspath", + "samefile","sameopenfile","samestat"] # Normalize the case of a pathname. Trivial in Posix, string.lower on Mac. # On MS-DOS this may also turn slashes into backslashes; however, other diff --git a/Lib/pprint.py b/Lib/pprint.py index 8e10e9d9dc8..814ca48af07 100644 --- a/Lib/pprint.py +++ b/Lib/pprint.py @@ -41,6 +41,8 @@ try: except ImportError: from StringIO import StringIO +__all__ = ["pprint","pformat","isreadable","isrecursive","saferepr", + "PrettyPrinter"] def pprint(object, stream=None): """Pretty-print a Python object to a stream [default is sys.sydout].""" diff --git a/Lib/pre.py b/Lib/pre.py index 35d3e3a9106..30f049193d8 100644 --- a/Lib/pre.py +++ b/Lib/pre.py @@ -87,6 +87,8 @@ This module also defines an exception 'error'. import sys from pcre import * +__all__ = ["match","search","sub","subn","split","findall","escape","compile"] + # # First, the public part of the interface: # diff --git a/Lib/profile.py b/Lib/profile.py index c32b3f8b3bc..afc47eb347a 100755 --- a/Lib/profile.py +++ b/Lib/profile.py @@ -40,6 +40,7 @@ import os import time import marshal +__all__ = ["run","help","Profile"] # Sample timer for use with #i_count = 0 diff --git a/Lib/pstats.py b/Lib/pstats.py index 764d89c95ea..ea459d72003 100644 --- a/Lib/pstats.py +++ b/Lib/pstats.py @@ -39,6 +39,8 @@ import re import fpformat +__all__ = ["Stats"] + class Stats: """This class is used for creating reports from data generated by the Profile class. It is a "friend" of that class, and imports data either diff --git a/Lib/pty.py b/Lib/pty.py index ef2113bbb08..64d391b63c6 100644 --- a/Lib/pty.py +++ b/Lib/pty.py @@ -10,6 +10,8 @@ from select import select import os, FCNTL import tty +__all__ = ["openpty","fork","spawn"] + STDIN_FILENO = 0 STDOUT_FILENO = 1 STDERR_FILENO = 2 diff --git a/Lib/py_compile.py b/Lib/py_compile.py index da3bdafb969..48c4afc3623 100644 --- a/Lib/py_compile.py +++ b/Lib/py_compile.py @@ -6,6 +6,8 @@ This module has intimate knowledge of the format of .pyc files. import imp MAGIC = imp.get_magic() +__all__ = ["compile"] + def wr_long(f, x): """Internal; write a 32-bit int to a file in little-endian order.""" f.write(chr( x & 0xff)) diff --git a/Lib/pyclbr.py b/Lib/pyclbr.py index b4e934bff74..c9bb2fe2bbb 100644 --- a/Lib/pyclbr.py +++ b/Lib/pyclbr.py @@ -59,6 +59,8 @@ import imp import re import string +__all__ = ["readmodule"] + TABWIDTH = 8 _getnext = re.compile(r""" diff --git a/Lib/quopri.py b/Lib/quopri.py index 5bb11f653d7..5f5e80c6dbf 100755 --- a/Lib/quopri.py +++ b/Lib/quopri.py @@ -4,6 +4,8 @@ # (Dec 1991 version). +__all__ = ["encode","decode"] + ESCAPE = '=' MAXLINESIZE = 76 HEX = '0123456789ABCDEF' diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py index f6f00c5cd5a..cced8592c44 100644 --- a/Lib/test/test___all__.py +++ b/Lib/test/test___all__.py @@ -99,4 +99,15 @@ check_all("pdb") check_all("pickle") check_all("pipes") check_all("popen2") +check_all("poplib") +check_all("posixfile") +check_all("posixpath") +check_all("pprint") +check_all("pre") +check_all("profile") +check_all("pstats") +check_all("pty") +check_all("py_compile") +check_all("pyclbr") +check_all("quopri") check_all("robotparser")