<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 98.2 beta6 (August 14th, 1998)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>4. ctb --
Interface to the Communications Tool Box</TITLE>
<META NAME="description" CONTENT="4. ctb --
Interface to the Communications Tool Box">
<META NAME="keywords" CONTENT="mac">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="mac.css">
<LINK REL="next" HREF="module-macconsole.html">
<LINK REL="previous" HREF="module-macpath.html">
<LINK REL="up" HREF="contents.html">
<LINK REL="next" HREF="connection-object.html">
</HEAD>
<BODY bgcolor="#ffffff">
<div class=navigation>
<table align=center width="100%" cellpadding=0 cellspacing=2>
<tr>
<td><A HREF="connection-object.html"><img width=32 height=32 align=bottom border=0 alt="next"
 src="../icons/next.gif"></A></td>
<td><A HREF="contents.html"><img width=32 height=32 align=bottom border=0 alt="up"
 src="../icons/up.gif"></A></td>
<td><A HREF="module-macpath.html"><img width=32 height=32 align=bottom border=0 alt="previous"
 src="../icons/previous.gif"></A></td>
<td align=center bgcolor="#99CCFF" width="100%">
 <b class=title>Macintosh Library Modules</b></td>
<td><A HREF="contents.html"><img width=32 height=32 align=bottom border=0 alt="contents"
 src="../icons/contents.gif"></A></td>
<td><a
 href="modindex.html"><img width=32 height=32 align=bottom border=0 alt="modules"
 src="../icons/modules.gif"></a></td>
<td><A HREF="genindex.html"><img width=32 height=32 align=bottom border=0 alt="index"
 src="../icons/index.gif"></A></td>
</tr></table><b class=navlabel>Next:</b> <span class=sectref><A HREF="connection-object.html">4.1 Connection Objects</A></span>
<b class=navlabel>Up:</b> <span class=sectref><A HREF="contents.html">Contents</A></span>
<b class=navlabel>Previous:</b> <span class=sectref><A HREF="module-macpath.html">3. macpath  </A></span>
<br><hr></div>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION002400000000000000000">
4. <tt class=module>ctb</tt> --
         Interface to the Communications Tool Box</A>
</H1>

<P>
  
<p class=availability>Availability: <span
 class=platform>Macintosh</span>.</p>

<P>
This module provides a partial interface to the Macintosh
Communications Toolbox. Currently, only Connection Manager tools are
supported.  It may not be available in all Mac Python versions.
<a name="l2h-14"></a>
<a name="l2h-15"></a>
<a name="l2h-16"></a>

<P>
<dl><dt><b><a name="l2h-7"><tt>error</tt></a></b>
<dd>
The exception raised on errors.
</dl>

<P>
<dl><dt><b><a name="l2h-8"><tt>cmData</tt></a></b>
<dd>
<dt><b><a name="l2h-17"><tt>cmCntl</tt></a></b><dd>
<dt><b><a name="l2h-18"><tt>cmAttn</tt></a></b><dd>
Flags for the <var>channel</var> argument of the <tt class=method>Read()</tt> and
<tt class=method>Write()</tt> methods.
</dl>

<P>
<dl><dt><b><a name="l2h-9"><tt>cmFlagsEOM</tt></a></b>
<dd>
End-of-message flag for <tt class=method>Read()</tt> and <tt class=method>Write()</tt>.
</dl>

<P>
<dl><dt><b><a name="l2h-10"><tt>choose*</tt></a></b>
<dd>
Values returned by <tt class=method>Choose()</tt>.
</dl>

<P>
<dl><dt><b><a name="l2h-11"><tt>cmStatus*</tt></a></b>
<dd>
Bits in the status as returned by <tt class=method>Status()</tt>.
</dl>

<P>
<dl><dt><b><a name="l2h-12"><tt class=function>available</tt></a></b> ()
<dd>
Return <tt>1</tt> if the Communication Toolbox is available, zero otherwise.
</dl>

<P>
<dl><dt><b><a name="l2h-13"><tt class=function>CMNew</tt></a></b> (<var>name, sizes</var>)
<dd>
Create a connection object using the connection tool named
<var>name</var>. <var>sizes</var> is a 6-tuple given buffer sizes for data in,
data out, control in, control out, attention in and attention out.
Alternatively, passing <tt>None</tt> for <var>sizes</var> will result in
default buffer sizes.
</dl>

<P>

<p><hr>
<!--Table of Child-Links-->


<UL>
<LI><A NAME="tex2html154"
 HREF="connection-object.html">4.1 Connection Objects </A>
</UL>
<!--End of Table of Child-Links-->
<p>
<div class=navigation><hr><table align=center width="100%" cellpadding=0 cellspacing=2>
<tr>
<td><A HREF="connection-object.html"><img width=32 height=32 align=bottom border=0 alt="next"
 src="../icons/next.gif"></A></td>
<td><A HREF="contents.html"><img width=32 height=32 align=bottom border=0 alt="up"
 src="../icons/up.gif"></A></td>
<td><A HREF="module-macpath.html"><img width=32 height=32 align=bottom border=0 alt="previous"
 src="../icons/previous.gif"></A></td>
<td align=center bgcolor="#99CCFF" width="100%">
 <b class=title>Macintosh Library Modules</b></td>
<td><A HREF="contents.html"><img width=32 height=32 align=bottom border=0 alt="contents"
 src="../icons/contents.gif"></A></td>
<td><a
 href="modindex.html"><img width=32 height=32 align=bottom border=0 alt="modules"
 src="../icons/modules.gif"></a></td>
<td><A HREF="genindex.html"><img width=32 height=32 align=bottom border=0 alt="index"
 src="../icons/index.gif"></A></td>
</tr></table><b class=navlabel>Next:</b> <span class=sectref><A HREF="connection-object.html">4.1 Connection Objects</A></span>
<b class=navlabel>Up:</b> <span class=sectref><A HREF="contents.html">Contents</A></span>
<b class=navlabel>Previous:</b> <span class=sectref><A HREF="module-macpath.html">3. macpath  </A></span>
</div>
<!--End of Navigation Panel-->
<ADDRESS>
<hr>Send comments on this document to <a href="mailto:python-docs@python.org">python-docs@python.org</a>.
</ADDRESS>
</BODY>
</HTML>
