Remove some long-unsupported Mac OS modules.
This closes SF patch #460737.
This commit is contained in:
parent
645a7e08b3
commit
e8f47bb93a
|
@ -293,11 +293,9 @@ MACFILES= $(HOWTOSTYLES) $(INDEXSTYLES) $(COMMONTEX) \
|
|||
mac/libaepack.tex \
|
||||
mac/libaetypes.tex \
|
||||
mac/libctb.tex \
|
||||
mac/libmacdnr.tex \
|
||||
mac/libmacfs.tex \
|
||||
mac/libmacos.tex \
|
||||
mac/libmacostools.tex \
|
||||
mac/libmactcp.tex \
|
||||
mac/libmacspeech.tex \
|
||||
mac/libmacui.tex \
|
||||
mac/libmacic.tex \
|
||||
|
|
|
@ -1,114 +0,0 @@
|
|||
\section{\module{macconsole} ---
|
||||
Think C's console package}
|
||||
|
||||
\declaremodule{builtin}{macconsole}
|
||||
\platform{Mac}
|
||||
\modulesynopsis{Think C's console package.}
|
||||
|
||||
|
||||
This module is available on the Macintosh, provided Python has been
|
||||
built using the Think C compiler. It provides an interface to the
|
||||
Think console package, with which basic text windows can be created.
|
||||
|
||||
\begin{datadesc}{options}
|
||||
An object allowing you to set various options when creating windows,
|
||||
see below.
|
||||
\end{datadesc}
|
||||
|
||||
\begin{datadesc}{C_ECHO}
|
||||
\dataline{C_NOECHO}
|
||||
\dataline{C_CBREAK}
|
||||
\dataline{C_RAW}
|
||||
Options for the \code{setmode} method. \constant{C_ECHO} and
|
||||
\constant{C_CBREAK} enable character echo, the other two disable it,
|
||||
\constant{C_ECHO} and \constant{C_NOECHO} enable line-oriented input
|
||||
(erase/kill processing, etc).
|
||||
\end{datadesc}
|
||||
|
||||
\begin{funcdesc}{copen}{}
|
||||
Open a new console window. Return a console window object.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{fopen}{fp}
|
||||
Return the console window object corresponding with the given file
|
||||
object. \var{fp} should be one of \code{sys.stdin}, \code{sys.stdout} or
|
||||
\code{sys.stderr}.
|
||||
\end{funcdesc}
|
||||
|
||||
\subsection{macconsole options object}
|
||||
These options are examined when a window is created:
|
||||
|
||||
\setindexsubitem{(macconsole option)}
|
||||
\begin{datadesc}{top}
|
||||
\dataline{left}
|
||||
The origin of the window.
|
||||
\end{datadesc}
|
||||
|
||||
\begin{datadesc}{nrows}
|
||||
\dataline{ncols}
|
||||
The size of the window.
|
||||
\end{datadesc}
|
||||
|
||||
\begin{datadesc}{txFont}
|
||||
\dataline{txSize}
|
||||
\dataline{txStyle}
|
||||
The font, fontsize and fontstyle to be used in the window.
|
||||
\end{datadesc}
|
||||
|
||||
\begin{datadesc}{title}
|
||||
The title of the window.
|
||||
\end{datadesc}
|
||||
|
||||
\begin{datadesc}{pause_atexit}
|
||||
If set non-zero, the window will wait for user action before closing.
|
||||
\end{datadesc}
|
||||
|
||||
\subsection{console window object}
|
||||
|
||||
\setindexsubitem{(console window attribute)}
|
||||
|
||||
\begin{datadesc}{file}
|
||||
The file object corresponding to this console window. If the file is
|
||||
buffered, you should call \code{\var{file}.flush()} between
|
||||
\code{write()} and \code{read()} calls.
|
||||
\end{datadesc}
|
||||
|
||||
\setindexsubitem{(console window method)}
|
||||
|
||||
\begin{funcdesc}{setmode}{mode}
|
||||
Set the input mode of the console to \constant{C_ECHO}, etc.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{settabs}{n}
|
||||
Set the tabsize to \var{n} spaces.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{cleos}{}
|
||||
Clear to end-of-screen.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{cleol}{}
|
||||
Clear to end-of-line.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{inverse}{onoff}
|
||||
Enable inverse-video mode:\ characters with the high bit set are
|
||||
displayed in inverse video (this disables the upper half of a
|
||||
non-\ASCII{} character set).
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{gotoxy}{x, y}
|
||||
Set the cursor to position \code{(\var{x}, \var{y})}.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{hide}{}
|
||||
Hide the window, remembering the contents.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{show}{}
|
||||
Show the window again.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{echo2printer}{}
|
||||
Copy everything written to the window to the printer as well.
|
||||
\end{funcdesc}
|
|
@ -1,125 +0,0 @@
|
|||
\section{\module{macdnr} ---
|
||||
Interface to the Macintosh Domain Name Resolver}
|
||||
|
||||
\declaremodule{builtin}{macdnr}
|
||||
\platform{Mac}
|
||||
\modulesynopsis{Interfaces to the Macintosh Domain Name Resolver.}
|
||||
|
||||
|
||||
This module provides an interface to the Macintosh Domain Name
|
||||
Resolver. It is usually used in conjunction with the \refmodule{mactcp}
|
||||
module, to map hostnames to IP addresses. It may not be available in
|
||||
all Mac Python versions.
|
||||
\index{Macintosh Domain Name Resolver}
|
||||
\index{Domain Name Resolver, Macintosh}
|
||||
|
||||
The \module{macdnr} module defines the following functions:
|
||||
|
||||
|
||||
\begin{funcdesc}{Open}{\optional{filename}}
|
||||
Open the domain name resolver extension. If \var{filename} is given it
|
||||
should be the pathname of the extension, otherwise a default is
|
||||
used. Normally, this call is not needed since the other calls will
|
||||
open the extension automatically.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{Close}{}
|
||||
Close the resolver extension. Again, not needed for normal use.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{StrToAddr}{hostname}
|
||||
Look up the IP address for \var{hostname}. This call returns a dnr
|
||||
result object of the ``address'' variation.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{AddrToName}{addr}
|
||||
Do a reverse lookup on the 32-bit integer IP-address
|
||||
\var{addr}. Returns a dnr result object of the ``address'' variation.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{AddrToStr}{addr}
|
||||
Convert the 32-bit integer IP-address \var{addr} to a dotted-decimal
|
||||
string. Returns the string.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{HInfo}{hostname}
|
||||
Query the nameservers for a \code{HInfo} record for host
|
||||
\var{hostname}. These records contain hardware and software
|
||||
information about the machine in question (if they are available in
|
||||
the first place). Returns a dnr result object of the ``hinfo''
|
||||
variety.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{MXInfo}{domain}
|
||||
Query the nameservers for a mail exchanger for \var{domain}. This is
|
||||
the hostname of a host willing to accept SMTP\index{SMTP} mail for the
|
||||
given domain. Returns a dnr result object of the ``mx'' variety.
|
||||
\end{funcdesc}
|
||||
|
||||
|
||||
\subsection{DNR Result Objects \label{dnr-result-object}}
|
||||
|
||||
Since the DNR calls all execute asynchronously you do not get the
|
||||
results back immediately. Instead, you get a dnr result object. You
|
||||
can check this object to see whether the query is complete, and access
|
||||
its attributes to obtain the information when it is.
|
||||
|
||||
Alternatively, you can also reference the result attributes directly,
|
||||
this will result in an implicit wait for the query to complete.
|
||||
|
||||
The \member{rtnCode} and \member{cname} attributes are always
|
||||
available, the others depend on the type of query (address, hinfo or
|
||||
mx).
|
||||
|
||||
|
||||
% Add args, as in {arg1, arg2 \optional{, arg3}}
|
||||
\begin{methoddesc}[dnr result]{wait}{}
|
||||
Wait for the query to complete.
|
||||
\end{methoddesc}
|
||||
|
||||
% Add args, as in {arg1, arg2 \optional{, arg3}}
|
||||
\begin{methoddesc}[dnr result]{isdone}{}
|
||||
Return \code{1} if the query is complete.
|
||||
\end{methoddesc}
|
||||
|
||||
|
||||
\begin{memberdesc}[dnr result]{rtnCode}
|
||||
The error code returned by the query.
|
||||
\end{memberdesc}
|
||||
|
||||
\begin{memberdesc}[dnr result]{cname}
|
||||
The canonical name of the host that was queried.
|
||||
\end{memberdesc}
|
||||
|
||||
\begin{memberdesc}[dnr result]{ip0}
|
||||
\memberline{ip1}
|
||||
\memberline{ip2}
|
||||
\memberline{ip3}
|
||||
At most four integer IP addresses for this host. Unused entries are
|
||||
zero. Valid only for address queries.
|
||||
\end{memberdesc}
|
||||
|
||||
\begin{memberdesc}[dnr result]{cpuType}
|
||||
\memberline{osType}
|
||||
Textual strings giving the machine type an OS name. Valid for ``hinfo''
|
||||
queries.
|
||||
\end{memberdesc}
|
||||
|
||||
\begin{memberdesc}[dnr result]{exchange}
|
||||
The name of a mail-exchanger host. Valid for ``mx'' queries.
|
||||
\end{memberdesc}
|
||||
|
||||
\begin{memberdesc}[dnr result]{preference}
|
||||
The preference of this mx record. Not too useful, since the Macintosh
|
||||
will only return a single mx record. Valid for ``mx'' queries only.
|
||||
\end{memberdesc}
|
||||
|
||||
The simplest way to use the module to convert names to dotted-decimal
|
||||
strings, without worrying about idle time, etc:
|
||||
|
||||
\begin{verbatim}
|
||||
>>> def gethostname(name):
|
||||
... import macdnr
|
||||
... dnrr = macdnr.StrToAddr(name)
|
||||
... return macdnr.AddrToStr(dnrr.ip0)
|
||||
\end{verbatim}
|
|
@ -1,181 +0,0 @@
|
|||
\section{\module{mactcp} ---
|
||||
The MacTCP interfaces}
|
||||
|
||||
\declaremodule{builtin}{mactcp}
|
||||
\platform{Mac}
|
||||
\modulesynopsis{The MacTCP interfaces.}
|
||||
|
||||
|
||||
This module provides an interface to the Macintosh TCP/IP driver%
|
||||
\index{MacTCP} MacTCP. There is an accompanying module,
|
||||
\refmodule{macdnr}\refbimodindex{macdnr}, which provides an interface
|
||||
to the name-server (allowing you to translate hostnames to IP
|
||||
addresses), a module \module{MACTCPconst}\refstmodindex{MACTCPconst}
|
||||
which has symbolic names for constants constants used by MacTCP. Since
|
||||
the built-in module \module{socket}\refbimodindex{socket} is also
|
||||
available on the Macintosh it is usually easier to use sockets instead
|
||||
of the Macintosh-specific MacTCP API.
|
||||
|
||||
A complete description of the MacTCP interface can be found in the
|
||||
Apple MacTCP API documentation.
|
||||
|
||||
\begin{funcdesc}{MTU}{}
|
||||
Return the Maximum Transmit Unit (the packet size) of the network
|
||||
interface.\index{Maximum Transmit Unit}
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{IPAddr}{}
|
||||
Return the 32-bit integer IP address of the network interface.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{NetMask}{}
|
||||
Return the 32-bit integer network mask of the interface.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{TCPCreate}{size}
|
||||
Create a TCP Stream object. \var{size} is the size of the receive
|
||||
buffer, \code{4096} is suggested by various sources.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{UDPCreate}{size, port}
|
||||
Create a UDP Stream object. \var{size} is the size of the receive
|
||||
buffer (and, hence, the size of the biggest datagram you can receive
|
||||
on this port). \var{port} is the UDP port number you want to receive
|
||||
datagrams on, a value of zero will make MacTCP select a free port.
|
||||
\end{funcdesc}
|
||||
|
||||
|
||||
\subsection{TCP Stream Objects}
|
||||
|
||||
\begin{memberdesc}[TCP Stream]{asr}
|
||||
\index{asynchronous service routine}
|
||||
\index{service routine, asynchronous}
|
||||
When set to a value different than \code{None} this should refer to a
|
||||
function with two integer parameters:\ an event code and a detail. This
|
||||
function will be called upon network-generated events such as urgent
|
||||
data arrival. Macintosh documentation calls this the
|
||||
\dfn{asynchronous service routine}. In addition, it is called with
|
||||
eventcode \code{MACTCP.PassiveOpenDone} when a \method{PassiveOpen()}
|
||||
completes. This is a Python addition to the MacTCP semantics.
|
||||
It is safe to do further calls from \var{asr}.
|
||||
\end{memberdesc}
|
||||
|
||||
|
||||
\begin{methoddesc}[TCP Stream]{PassiveOpen}{port}
|
||||
Wait for an incoming connection on TCP port \var{port} (zero makes the
|
||||
system pick a free port). The call returns immediately, and you should
|
||||
use \method{wait()} to wait for completion. You should not issue any method
|
||||
calls other than \method{wait()}, \method{isdone()} or
|
||||
\method{GetSockName()} before the call completes.
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}[TCP Stream]{wait}{}
|
||||
Wait for \method{PassiveOpen()} to complete.
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}[TCP Stream]{isdone}{}
|
||||
Return \code{1} if a \method{PassiveOpen()} has completed.
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}[TCP Stream]{GetSockName}{}
|
||||
Return the TCP address of this side of a connection as a 2-tuple
|
||||
\code{(\var{host}, \var{port})}, both integers.
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}[TCP Stream]{ActiveOpen}{lport, host, rport}
|
||||
Open an outgoing connection to TCP address \code{(\var{host},
|
||||
\var{rport})}. Use
|
||||
local port \var{lport} (zero makes the system pick a free port). This
|
||||
call blocks until the connection has been established.
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}[TCP Stream]{Send}{buf, push, urgent}
|
||||
Send data \var{buf} over the connection. \var{push} and \var{urgent}
|
||||
are flags as specified by the TCP standard.
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}[TCP Stream]{Rcv}{timeout}
|
||||
Receive data. The call returns when \var{timeout} seconds have passed
|
||||
or when (according to the MacTCP documentation) ``a reasonable amount
|
||||
of data has been received''. The return value is a 3-tuple
|
||||
\code{(\var{data}, \var{urgent}, \var{mark})}. If urgent data is
|
||||
outstanding \code{Rcv} will always return that before looking at any
|
||||
normal data. The first call returning urgent data will have the
|
||||
\var{urgent} flag set, the last will have the \var{mark} flag set.
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}[TCP Stream]{Close}{}
|
||||
Tell MacTCP that no more data will be transmitted on this
|
||||
connection. The call returns when all data has been acknowledged by
|
||||
the receiving side.
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}[TCP Stream]{Abort}{}
|
||||
Forcibly close both sides of a connection, ignoring outstanding data.
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}[TCP Stream]{Status}{}
|
||||
Return a TCP status object for this stream giving the current status
|
||||
(see below).
|
||||
\end{methoddesc}
|
||||
|
||||
|
||||
\subsection{TCP Status Objects}
|
||||
|
||||
This object has no methods, only some members holding information on
|
||||
the connection. A complete description of all fields in this objects
|
||||
can be found in the Apple documentation. The most interesting ones are:
|
||||
|
||||
\begin{memberdesc}[TCP Status]{localHost}
|
||||
\memberline{localPort}
|
||||
\memberline{remoteHost}
|
||||
\memberline{remotePort}
|
||||
The integer IP-addresses and port numbers of both endpoints of the
|
||||
connection.
|
||||
\end{memberdesc}
|
||||
|
||||
\begin{memberdesc}[TCP Status]{sendWindow}
|
||||
The current window size.
|
||||
\end{memberdesc}
|
||||
|
||||
\begin{memberdesc}[TCP Status]{amtUnackedData}
|
||||
The number of bytes sent but not yet acknowledged. \code{sendWindow -
|
||||
amtUnackedData} is what you can pass to \method{Send()} without
|
||||
blocking.
|
||||
\end{memberdesc}
|
||||
|
||||
\begin{memberdesc}[TCP Status]{amtUnreadData}
|
||||
The number of bytes received but not yet read (what you can
|
||||
\method{Recv()} without blocking).
|
||||
\end{memberdesc}
|
||||
|
||||
|
||||
|
||||
\subsection{UDP Stream Objects}
|
||||
|
||||
Note that, unlike the name suggests, there is nothing stream-like
|
||||
about UDP.
|
||||
|
||||
|
||||
\begin{memberdesc}[UDP Stream]{asr}
|
||||
\index{asynchronous service routine}
|
||||
\index{service routine, asynchronous}
|
||||
The asynchronous service routine to be called on events such as
|
||||
datagram arrival without outstanding \code{Read} call. The \var{asr}
|
||||
has a single argument, the event code.
|
||||
\end{memberdesc}
|
||||
|
||||
\begin{memberdesc}[UDP Stream]{port}
|
||||
A read-only member giving the port number of this UDP Stream.
|
||||
\end{memberdesc}
|
||||
|
||||
|
||||
\begin{methoddesc}[UDP Stream]{Read}{timeout}
|
||||
Read a datagram, waiting at most \var{timeout} seconds (-1 is
|
||||
infinite). Return the data.
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}[UDP Stream]{Write}{host, port, buf}
|
||||
Send \var{buf} as a datagram to IP-address \var{host}, port
|
||||
\var{port}.
|
||||
\end{methoddesc}
|
|
@ -52,13 +52,10 @@ documented here:
|
|||
|
||||
\input{libmac}
|
||||
\input{libctb}
|
||||
%\input{libmacconsole}
|
||||
\input{libmacdnr}
|
||||
\input{libmacfs}
|
||||
\input{libmacic}
|
||||
\input{libmacos}
|
||||
\input{libmacostools}
|
||||
\input{libmactcp}
|
||||
\input{libmacspeech}
|
||||
\input{libmacui}
|
||||
\input{libframework}
|
||||
|
|
Loading…
Reference in New Issue