Kaydet (Commit) 352674d0 authored tarafından Skip Montanaro's avatar Skip Montanaro

a few more __all__ lists

üst cc012e92
...@@ -13,6 +13,9 @@ import repr ...@@ -13,6 +13,9 @@ import repr
import os import os
import re import re
__all__ = ["run", "pm", "Pdb", "runeval", "runctx", "runcall", "set_trace",
"post_mortem", "help"]
def find_function(funcname, filename): def find_function(funcname, filename):
cre = re.compile(r'def\s+%s\s*[(]' % funcname) cre = re.compile(r'def\s+%s\s*[(]' % funcname)
try: try:
......
...@@ -31,6 +31,9 @@ import marshal ...@@ -31,6 +31,9 @@ import marshal
import sys import sys
import struct import struct
__all__ = ["PickleError", "PicklingError", "UnpicklingError", "Pickler",
"Unpickler", "dump", "dumps", "load", "loads"]
format_version = "1.3" # File format version we write format_version = "1.3" # File format version we write
compatible_formats = ["1.0", "1.1", "1.2"] # Old format versions we can read compatible_formats = ["1.0", "1.1", "1.2"] # Old format versions we can read
......
...@@ -56,7 +56,7 @@ To create a new template object initialized to a given one: ...@@ -56,7 +56,7 @@ To create a new template object initialized to a given one:
t2 = t.clone() t2 = t.clone()
For an example, see the function test() at the end of the file. For an example, see the function test() at the end of the file.
""" """ # '
import sys import sys
...@@ -66,6 +66,7 @@ import os ...@@ -66,6 +66,7 @@ import os
import tempfile import tempfile
import string import string
__all__ = ["Template"]
# Conversion step kinds # Conversion step kinds
......
...@@ -9,6 +9,8 @@ and popen3(cmd) which return two or three pipes to the spawned command. ...@@ -9,6 +9,8 @@ and popen3(cmd) which return two or three pipes to the spawned command.
import os import os
import sys import sys
__all__ = ["popen2", "popen3", "popen4"]
MAXFD = 256 # Max number of file descriptors (os.getdtablesize()???) MAXFD = 256 # Max number of file descriptors (os.getdtablesize()???)
_active = [] _active = []
...@@ -155,7 +157,8 @@ else: ...@@ -155,7 +157,8 @@ else:
inst = Popen4(cmd, bufsize) inst = Popen4(cmd, bufsize)
return inst.fromchild, inst.tochild return inst.fromchild, inst.tochild
__all__.extend(["Popen3", "Popen4"])
def _test(): def _test():
cmd = "cat" cmd = "cat"
teststr = "ab cd\n" teststr = "ab cd\n"
......
...@@ -95,4 +95,8 @@ check_all("nntplib") ...@@ -95,4 +95,8 @@ check_all("nntplib")
check_all("ntpath") check_all("ntpath")
check_all("nturl2path") check_all("nturl2path")
check_all("os") check_all("os")
check_all("pdb")
check_all("pickle")
check_all("pipes")
check_all("popen2")
check_all("robotparser") check_all("robotparser")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment