Superseded Modules
The modules described in this chapter are deprecated and only kept for backwards compatibility. They have been superseded by other modules.
aifc— Read and write AIFF and AIFC filesopen()aifc.getnchannels()aifc.getsampwidth()aifc.getframerate()aifc.getnframes()aifc.getcomptype()aifc.getcompname()aifc.getparams()aifc.getmarkers()aifc.getmark()aifc.readframes()aifc.rewind()aifc.setpos()aifc.tell()aifc.close()aifc.aiff()aifc.aifc()aifc.setnchannels()aifc.setsampwidth()aifc.setframerate()aifc.setnframes()aifc.setcomptype()aifc.setparams()aifc.setmark()aifc.writeframes()aifc.writeframesraw()
asynchat— Asynchronous socket command/response handlerasyncore— Asynchronous socket handlerloop()dispatcherdispatcher.handle_read()dispatcher.handle_write()dispatcher.handle_expt()dispatcher.handle_connect()dispatcher.handle_close()dispatcher.handle_error()dispatcher.handle_accept()dispatcher.handle_accepted()dispatcher.readable()dispatcher.writable()dispatcher.create_socket()dispatcher.connect()dispatcher.send()dispatcher.recv()dispatcher.listen()dispatcher.bind()dispatcher.accept()dispatcher.close()
dispatcher_with_sendfile_dispatcherfile_wrapper- asyncore Example basic HTTP client
- asyncore Example basic echo server
audioop— Manipulate raw audio datacgi— Common Gateway Interface supportcgitb— Traceback manager for CGI scriptschunk— Read IFF chunked datacrypt— Function to check Unix passwordsimghdr— Determine the type of an imageimp— Access the import internalsmailcap— Mailcap file handlingmsilib— Read and write Microsoft Installer filesnis— Interface to Sun’s NIS (Yellow Pages)nntplib— NNTP protocol clientNNTPNNTP_SSLNNTPErrorNNTPReplyErrorNNTPTemporaryErrorNNTPPermanentErrorNNTPProtocolErrorNNTPDataError- NNTP Objects
- Attributes
- Methods
NNTP.quit()NNTP.getwelcome()NNTP.getcapabilities()NNTP.login()NNTP.starttls()NNTP.newgroups()NNTP.newnews()NNTP.list()NNTP.descriptions()NNTP.description()NNTP.group()NNTP.over()NNTP.help()NNTP.stat()NNTP.next()NNTP.last()NNTP.article()NNTP.head()NNTP.body()NNTP.post()NNTP.ihave()NNTP.date()NNTP.slave()NNTP.set_debuglevel()NNTP.xhdr()NNTP.xover()
- Utility functions
optparse— Parser for command line options- Background
- Tutorial
- Reference Guide
- Option Callbacks
- Defining a callback option
- How callbacks are called
- Raising errors in a callback
- Callback example 1: trivial callback
- Callback example 2: check option order
- Callback example 3: check option order (generalized)
- Callback example 4: check arbitrary condition
- Callback example 5: fixed arguments
- Callback example 6: variable arguments
- Extending
optparse
ossaudiodev— Access to OSS-compatible audio devicesOSSAudioErroropen()openmixer()- Audio Device Objects
oss_audio_device.close()oss_audio_device.fileno()oss_audio_device.read()oss_audio_device.write()oss_audio_device.writeall()oss_audio_device.nonblock()oss_audio_device.getfmts()oss_audio_device.setfmt()oss_audio_device.channels()oss_audio_device.speed()oss_audio_device.sync()oss_audio_device.reset()oss_audio_device.post()oss_audio_device.setparameters()oss_audio_device.bufsize()oss_audio_device.obufcount()oss_audio_device.obuffree()oss_audio_device.closedoss_audio_device.nameoss_audio_device.mode
- Mixer Device Objects
pipes— Interface to shell pipelinessmtpd— SMTP Serversndhdr— Determine type of sound filespwd— The shadow password databasesunau— Read and write Sun AU filesopen()ErrorAUDIO_FILE_MAGICAUDIO_FILE_ENCODING_MULAW_8AUDIO_FILE_ENCODING_LINEAR_8AUDIO_FILE_ENCODING_LINEAR_16AUDIO_FILE_ENCODING_LINEAR_24AUDIO_FILE_ENCODING_LINEAR_32AUDIO_FILE_ENCODING_ALAW_8AUDIO_FILE_ENCODING_FLOATAUDIO_FILE_ENCODING_DOUBLEAUDIO_FILE_ENCODING_ADPCM_G721AUDIO_FILE_ENCODING_ADPCM_G722AUDIO_FILE_ENCODING_ADPCM_G723_3AUDIO_FILE_ENCODING_ADPCM_G723_5- AU_read Objects
- AU_write Objects
telnetlib— Telnet clientTelnet- Telnet Objects
Telnet.read_until()Telnet.read_all()Telnet.read_some()Telnet.read_very_eager()Telnet.read_eager()Telnet.read_lazy()Telnet.read_very_lazy()Telnet.read_sb_data()Telnet.open()Telnet.msg()Telnet.set_debuglevel()Telnet.close()Telnet.get_socket()Telnet.fileno()Telnet.write()Telnet.interact()Telnet.mt_interact()Telnet.expect()Telnet.set_option_negotiation_callback()
- Telnet Example
uu— Encode and decode uuencode filesxdrlib— Encode and decode XDR dataPackerUnpacker- Packer Objects
- Unpacker Objects
Unpacker.reset()Unpacker.get_position()Unpacker.set_position()Unpacker.get_buffer()Unpacker.done()Unpacker.unpack_float()Unpacker.unpack_double()Unpacker.unpack_fstring()Unpacker.unpack_fopaque()Unpacker.unpack_string()Unpacker.unpack_opaque()Unpacker.unpack_bytes()Unpacker.unpack_list()Unpacker.unpack_farray()Unpacker.unpack_array()
- Exceptions