diff --git a/Lib/imghdr.py b/Lib/imghdr.py index 97687b09944..dc5fb229801 100644 --- a/Lib/imghdr.py +++ b/Lib/imghdr.py @@ -1,5 +1,6 @@ """Recognize image file formats based on their first few bytes.""" +__all__ = ["what"] #-------------------------# # Recognize image headers # diff --git a/Lib/imputil.py b/Lib/imputil.py index ca359e95d74..3185d7d94cc 100644 --- a/Lib/imputil.py +++ b/Lib/imputil.py @@ -14,6 +14,8 @@ import __builtin__ import struct import marshal +__all__ = ["ImportManager","Importer","BuiltinImporter"] + _StringType = type('') _ModuleType = type(sys) ### doesn't work in JPython... diff --git a/Lib/keyword.py b/Lib/keyword.py index 0c3dec2acaf..003e6521e5b 100755 --- a/Lib/keyword.py +++ b/Lib/keyword.py @@ -10,6 +10,8 @@ the python source tree after building the interpreter and run: python Lib/keyword.py """ +__all__ = ["iskeyword"] + kwlist = [ #--start keywords-- 'and', diff --git a/Lib/linecache.py b/Lib/linecache.py index c39f8db5954..d6fc28cae30 100644 --- a/Lib/linecache.py +++ b/Lib/linecache.py @@ -9,6 +9,8 @@ import sys import os from stat import * +__all__ = ["getline","clearcache","checkcache"] + def getline(filename, lineno): lines = getlines(filename) if 1 <= lineno <= len(lines): diff --git a/Lib/locale.py b/Lib/locale.py index ac272e769ef..24e4c0e437c 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -18,6 +18,11 @@ import string, sys # If this fails, fall back on a basic 'C' locale emulation. # +__all__ = ["setlocale","Error","localeconv","strcoll","strxfrm", + "format","str","atof","atoi","LC_CTYPE","LC_COLLATE", + "LC_TIME","LC_MONETARY","LC_NUMERIC","LC_MESSAGES", + "LC_ALL","CHAR_MAX"] + try: from _locale import * diff --git a/Lib/macpath.py b/Lib/macpath.py index bf2660f4f1d..197e50f0756 100644 --- a/Lib/macpath.py +++ b/Lib/macpath.py @@ -3,6 +3,10 @@ import os from stat import * +__all__ = ["normcase","isabs","join","splitdrive","split","splitext", + "basename","dirname","commonprefix","getsize","getmtime", + "getatime","islink","exists","isdir","isfile", + "walk","expanduser","expandvars","normpath","abspath"] # Normalize the case of a pathname. Dummy in Posix, but .lower() here. diff --git a/Lib/macurl2path.py b/Lib/macurl2path.py index aab085ece1b..a8be19884ce 100644 --- a/Lib/macurl2path.py +++ b/Lib/macurl2path.py @@ -6,6 +6,8 @@ import string import urllib import os +__all__ = ["url2pathname","pathname2url"] + def url2pathname(pathname): "Convert /-delimited pathname to mac pathname" # diff --git a/Lib/mailbox.py b/Lib/mailbox.py index 53b2c19f613..a5659486ced 100755 --- a/Lib/mailbox.py +++ b/Lib/mailbox.py @@ -6,6 +6,8 @@ import rfc822 import os +__all__ = ["UnixMailbox","MmdfMailbox","MHMailbox","Maildir","BabylMailbox"] + class _Mailbox: def __init__(self, fp): self.fp = fp diff --git a/Lib/mailcap.py b/Lib/mailcap.py index 2c3d07e25e6..d0cf0b93334 100644 --- a/Lib/mailcap.py +++ b/Lib/mailcap.py @@ -3,6 +3,7 @@ import os import string +__all__ = ["getcaps","findmatch"] # Part 1: top-level interface. diff --git a/Lib/mhlib.py b/Lib/mhlib.py index f5ece05e342..dbfa9e1bf37 100644 --- a/Lib/mhlib.py +++ b/Lib/mhlib.py @@ -82,6 +82,7 @@ import multifile import shutil from bisect import bisect +__all__ = ["MH","Error","Folder","Message"] # Exported constants diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py index 497a5cfad42..079f98c8117 100644 --- a/Lib/test/test___all__.py +++ b/Lib/test/test___all__.py @@ -76,4 +76,13 @@ check_all("htmllib") check_all("httplib") check_all("ihooks") check_all("imaplib") +check_all("imghdr") +check_all("imputil") +check_all("keyword") +check_all("linecache") +check_all("locale") +check_all("macpath") +check_all("macurl2path") +check_all("mailbox") +check_all("mhlib") check_all("robotparser")