import sys
from pcre import *
-__all__ = ["match","search","sub","subn","split","findall","escape","compile"]
+__all__ = ["match","search","sub","subn","split","findall","escape","compile",
+ "I","L","M","S","X","IGNORECASE","LOCALE","MULTILINE","DOTALL",
+ "VERBOSE","error"]
#
# First, the public part of the interface:
from math import log as _log, exp as _exp, pi as _pi, e as _e
from math import sqrt as _sqrt, acos as _acos, cos as _cos, sin as _sin
+__all__ = ["Random","seed","random","uniform","randint","choice",
+ "randrange","shuffle","normalvariate","lognormvariate",
+ "cunifvariate","expovariate","vonmisesvariate","gammavariate",
+ "stdgamma","gauss","betavariate","paretovariate","weibullvariate",
+ "getstate","setstate","jumpahead","whseed"]
+
def _verify(name, expected):
computed = eval(name)
if abs(computed - expected) > 1e-7:
if engine == "sre":
# New unicode-aware engine
from sre import *
+ from sre import __all__
else:
# Old 1.5.2 engine. This one supports 8-bit strings only,
# and will be removed in 2.0 final.
from pre import *
+ from pre import __all__
import regex
from regex_syntax import * # RE_*
+__all__ = ["convert","quote"]
+
# Default translation table
mastertable = {
r'\<': r'\b',
RE_SYNTAX_EMACS = 0
# (Python's obsolete "regexp" module used a syntax similar to awk.)
+
+__all__ = locals().keys()
+for _i in range(len(__all__)-1,-1,-1):
+ if __all__[_i][0] == "_":
+ del __all__[_i]
+del _i
import regex
+__all__ = ["sub","gsub","split","splitx","capwords"]
# Replace first occurrence of pattern pat in string str by replacement
# repl. If the pattern isn't found, the string is returned unchanged.
"""Redo the `...` (representation) but with limits on most sizes."""
+__all__ = ["Repr","repr"]
+
class Repr:
def __init__(self):
self.maxlevel = 6
import os
import ihooks
+__all__ = ["RExec"]
class FileBase:
import time
+__all__ = ["Message","AddressList","parsedate","parsedate_tz","mktime_tz"]
_blanklines = ('\r\n', '\n') # Optimization for islast()
import __builtin__
import __main__
+__all__ = ["Completer"]
+
class Completer:
def complete(self, text, state):
import bisect
+__all__ = ["scheduler"]
+
class scheduler:
def __init__(self, timefunc, delayfunc):
"""Initialize a new instance, passing the time and delay
import re
import string
+__all__ = ["SGMLParser"]
# Regular expressions used for parsing
except ImportError:
from StringIO import StringIO
+__all__ = ["Shelf","BsdDbShelf","DbfilenameShelf","open"]
class Shelf:
"""Base class for shelf implementations.
import os.path
import sys
+__all__ = ["shlex"]
+
class shlex:
"A lexical analyzer class for simple shell-like syntaxes."
def __init__(self, instream=None, infile=None):
import sys
import stat
+__all__ = ["copyfileobj","copyfile","copymode","copystat","copy","copy2",
+ "copytree","rmtree"]
def copyfileobj(fsrc, fdst, length=16*1024):
"""copy data from file-like object fsrc to file-like object fdst"""
import asyncore
import asynchat
+__all__ = ["SMTPServer","DebuggingServer","PureProxy","MailmanProxy"]
program = sys.argv[0]
__version__ = 'Python SMTP proxy version 0.2'
import rfc822
import types
+__all__ = ["SMTPException","SMTPServerDisconnected","SMTPResponseException",
+ "SMTPSenderRefused","SMTPRecipientsRefused","SMTPDataError",
+ "SMTPConnectError","SMTPHeloError","quoteaddr","quotedata",
+ "SMTP"]
+
SMTP_PORT = 25
CRLF="\r\n"
# The file structure is top-down except that the test program and its
# subroutine come last.
+__all__ = ["what","whathdr"]
def what(filename):
"""Guess the type of a sound file"""
import os, sys
+__all__ = ["getfqdn"]
+import _socket
+__all__.extend(os._get_exports_list(_socket))
+del _socket
+
if (sys.platform.lower().startswith("win")
or (hasattr(os, 'uname') and os.uname()[0] == "BeOS")):
import sre_compile
import sre_parse
+__all__ = ["match","search","sub","subn","split","findall","compile",
+ "purge","template","escape","I","L","M","S","X","U","IGNORECASE",
+ "LOCALE","MULTILINE","DOTALL","VERBOSE","UNICODE","error"]
+
# flags
I = IGNORECASE = sre_compile.SRE_FLAG_IGNORECASE # ignore case
L = LOCALE = sre_compile.SRE_FLAG_LOCALE # assume current 8-bit locale
from sre_constants import *
+__all__ = ["compile"]
+
assert _sre.MAGIC == MAGIC, "SRE module mismatch"
MAXCODE = 65535
SRE_INFO_LITERAL = 2 # entire pattern is literal (given by prefix)
SRE_INFO_CHARSET = 4 # pattern starts with character from given set
+__all__ = locals().keys()
+for _i in range(len(__all__)-1,-1,-1):
+ if __all__[_i][0] == "_":
+ del __all__[_i]
+del _i
+
if __name__ == "__main__":
def dump(f, d, prefix):
items = d.items()
from sre_constants import *
+__all__ = ["Pattern","SubPattern","Tokenizer","parse","parse_template",
+ "expand_template"]
+
SPECIAL_CHARS = ".\\[{()*+?^$|"
REPEAT_CHARS = "*+?{"
S_IROTH = 00004
S_IWOTH = 00002
S_IXOTH = 00001
+
+__all__ = locals().keys()
+for _i in range(len(__all__)-1,-1,-1):
+ if __all__[_i][0] == "_":
+ del __all__[_i]
+del _i
import os as _os
from stat import *
+__all__ = ["stat","reset","forget","forget_prefix","forget_dir",
+ "forget_except_prefix","isdir"]
+
# The cache. Keys are pathnames, values are os.stat outcomes.
# Remember that multiple threads may be calling this! So, e.g., that
# cache.has_key(path) returns 1 doesn't mean the cache will still contain
F_FAVAIL = 7 # Free nodes available to non-superuser
F_FLAG = 8 # Flags (see your local statvfs man page)
F_NAMEMAX = 9 # Maximum file name length
+
+__all__ = locals().keys()
+for _i in range(len(__all__)-1,-1,-1):
+ if __all__[_i][0] == "_":
+ del __all__[_i]
+del _i
letters = lowercase + uppercase
except ImportError:
pass # Use the original versions
+
+__all__ = locals().keys()
+for _i in range(len(__all__)-1,-1,-1):
+ if __all__[_i][0] == "_":
+ del __all__[_i]
+del _i
import sys
def check_all(modname):
+ import warnings
+ warnings.filterwarnings("ignore", "", DeprecationWarning, modname)
+
names = {}
try:
exec "import %s" % modname in names
check_all("py_compile")
check_all("pyclbr")
check_all("quopri")
+check_all("random")
+check_all("re")
+check_all("reconvert")
+check_all("regex_syntax")
+check_all("regsub")
+check_all("repr")
+check_all("rexec")
+check_all("rfc822")
+check_all("rlcompleter")
check_all("robotparser")
+check_all("sched")
+check_all("sgmllib")
+check_all("shelve")
+check_all("shlex")
+check_all("shutil")
+check_all("smtpd")
+check_all("smtplib")
+check_all("sndhdr")
+check_all("socket")
+check_all("sre")
+check_all("sre_compile")
+check_all("sre_constants")
+check_all("sre_parse")
+check_all("stat")
+check_all("stat_cache")
+check_all("statvfs")
+check_all("string")