Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > e1011ddec34cda34f3a002b121247943 > files > 677

python-docs-2.7.17-1.1.mga7.noarch.rpm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>38.4. aetypes — AppleEvent objects &#8212; Python 2.7.17 documentation</title>
    <link rel="stylesheet" href="../_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python 2.7.17 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="next" title="38.5. MiniAEFrame — Open Scripting Architecture server support" href="miniaeframe.html" />
    <link rel="prev" title="38.3. aepack — Conversion between Python variables and AppleEvent data containers" href="aepack.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
    <link rel="canonical" href="https://docs.python.org/2/library/aetypes.html" />
    <script type="text/javascript" src="../_static/copybutton.js"></script>
    
 
    

  </head><body>  
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="miniaeframe.html" title="38.5. MiniAEFrame — Open Scripting Architecture server support"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="aepack.html" title="38.3. aepack — Conversion between Python variables and AppleEvent data containers"
             accesskey="P">previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &#187;</li>
        <li>
          <a href="../index.html">Python 2.7.17 documentation</a> &#187;
        </li>

          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="macosa.html" accesskey="U">38. MacPython OSA Modules</a> &#187;</li> 
      </ul>
    </div>    

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-aetypes">
<span id="aetypes-appleevent-objects"></span><h1>38.4. <a class="reference internal" href="#module-aetypes" title="aetypes: Python representation of the Apple Event Object Model. (deprecated) (Mac)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">aetypes</span></code></a> — AppleEvent objects<a class="headerlink" href="#module-aetypes" title="Permalink to this headline">¶</a></h1>
<p>The <a class="reference internal" href="#module-aetypes" title="aetypes: Python representation of the Apple Event Object Model. (deprecated) (Mac)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">aetypes</span></code></a> defines classes used to represent Apple Event data
descriptors and Apple Event object specifiers.</p>
<p>Apple Event data is contained in descriptors, and these descriptors are typed.
For many descriptors the Python representation is simply the corresponding
Python type: <code class="docutils literal notranslate"><span class="pre">typeText</span></code> in OSA is a Python string, <code class="docutils literal notranslate"><span class="pre">typeFloat</span></code> is a float,
etc. For OSA types that have no direct Python counterpart this module declares
classes. Packing and unpacking instances of these classes is handled
automatically by <a class="reference internal" href="aepack.html#module-aepack" title="aepack: Conversion between Python variables and AppleEvent data containers. (deprecated) (Mac)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">aepack</span></code></a>.</p>
<p>An object specifier is essentially an address of an object implemented in an
Apple Event server. An Apple Event specifier is used as the direct object for an
Apple Event or as the argument of an optional parameter. The <a class="reference internal" href="#module-aetypes" title="aetypes: Python representation of the Apple Event Object Model. (deprecated) (Mac)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">aetypes</span></code></a>
module contains the base classes for OSA classes and properties, which are used
by the packages generated by <a class="reference internal" href="gensuitemodule.html#module-gensuitemodule" title="gensuitemodule: Create a stub package from an OSA dictionary (Mac)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gensuitemodule</span></code></a> to populate the classes and
properties in a given suite.</p>
<p>For reasons of backward compatibility, and for cases where you need to script an
application for which you have not generated the stub package this module also
contains object specifiers for a number of common OSA classes such as
<code class="docutils literal notranslate"><span class="pre">Document</span></code>, <code class="docutils literal notranslate"><span class="pre">Window</span></code>, <code class="docutils literal notranslate"><span class="pre">Character</span></code>, etc.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This module has been removed in Python 3.x.</p>
</div>
<p>The <code class="xref py py-mod docutils literal notranslate"><span class="pre">AEObjects</span></code> module defines the following classes to represent Apple
Event descriptor data:</p>
<dl class="class">
<dt id="aetypes.Unknown">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">Unknown</code><span class="sig-paren">(</span><em>type</em>, <em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.Unknown" title="Permalink to this definition">¶</a></dt>
<dd><p>The representation of OSA descriptor data for which the <a class="reference internal" href="aepack.html#module-aepack" title="aepack: Conversion between Python variables and AppleEvent data containers. (deprecated) (Mac)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">aepack</span></code></a> and
<a class="reference internal" href="#module-aetypes" title="aetypes: Python representation of the Apple Event Object Model. (deprecated) (Mac)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">aetypes</span></code></a> modules have no support, i.e. anything that is not represented by
the other classes here and that is not equivalent to a simple Python value.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.Enum">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">Enum</code><span class="sig-paren">(</span><em>enum</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.Enum" title="Permalink to this definition">¶</a></dt>
<dd><p>An enumeration value with the given 4-character string value.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.InsertionLoc">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">InsertionLoc</code><span class="sig-paren">(</span><em>of</em>, <em>pos</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.InsertionLoc" title="Permalink to this definition">¶</a></dt>
<dd><p>Position <code class="docutils literal notranslate"><span class="pre">pos</span></code> in object <code class="docutils literal notranslate"><span class="pre">of</span></code>.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.Boolean">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">Boolean</code><span class="sig-paren">(</span><em>bool</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.Boolean" title="Permalink to this definition">¶</a></dt>
<dd><p>A boolean.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.StyledText">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">StyledText</code><span class="sig-paren">(</span><em>style</em>, <em>text</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.StyledText" title="Permalink to this definition">¶</a></dt>
<dd><p>Text with style information (font, face, etc) included.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.AEText">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">AEText</code><span class="sig-paren">(</span><em>script</em>, <em>style</em>, <em>text</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.AEText" title="Permalink to this definition">¶</a></dt>
<dd><p>Text with script system and style information included.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.IntlText">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">IntlText</code><span class="sig-paren">(</span><em>script</em>, <em>language</em>, <em>text</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.IntlText" title="Permalink to this definition">¶</a></dt>
<dd><p>Text with script system and language information included.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.IntlWritingCode">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">IntlWritingCode</code><span class="sig-paren">(</span><em>script</em>, <em>language</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.IntlWritingCode" title="Permalink to this definition">¶</a></dt>
<dd><p>Script system and language information.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.QDPoint">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">QDPoint</code><span class="sig-paren">(</span><em>v</em>, <em>h</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.QDPoint" title="Permalink to this definition">¶</a></dt>
<dd><p>A quickdraw point.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.QDRectangle">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">QDRectangle</code><span class="sig-paren">(</span><em>v0</em>, <em>h0</em>, <em>v1</em>, <em>h1</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.QDRectangle" title="Permalink to this definition">¶</a></dt>
<dd><p>A quickdraw rectangle.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.RGBColor">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">RGBColor</code><span class="sig-paren">(</span><em>r</em>, <em>g</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.RGBColor" title="Permalink to this definition">¶</a></dt>
<dd><p>A color.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.Type">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">Type</code><span class="sig-paren">(</span><em>type</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.Type" title="Permalink to this definition">¶</a></dt>
<dd><p>An OSA type value with the given 4-character name.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.Keyword">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">Keyword</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.Keyword" title="Permalink to this definition">¶</a></dt>
<dd><p>An OSA keyword with the given 4-character name.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.Range">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">Range</code><span class="sig-paren">(</span><em>start</em>, <em>stop</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.Range" title="Permalink to this definition">¶</a></dt>
<dd><p>A range.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.Ordinal">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">Ordinal</code><span class="sig-paren">(</span><em>abso</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.Ordinal" title="Permalink to this definition">¶</a></dt>
<dd><p>Non-numeric absolute positions, such as <code class="docutils literal notranslate"><span class="pre">&quot;firs&quot;</span></code>, first, or <code class="docutils literal notranslate"><span class="pre">&quot;midd&quot;</span></code>,
middle.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.Logical">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">Logical</code><span class="sig-paren">(</span><em>logc</em>, <em>term</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.Logical" title="Permalink to this definition">¶</a></dt>
<dd><p>The logical expression of applying operator <code class="docutils literal notranslate"><span class="pre">logc</span></code> to <code class="docutils literal notranslate"><span class="pre">term</span></code>.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.Comparison">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">Comparison</code><span class="sig-paren">(</span><em>obj1</em>, <em>relo</em>, <em>obj2</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.Comparison" title="Permalink to this definition">¶</a></dt>
<dd><p>The comparison <code class="docutils literal notranslate"><span class="pre">relo</span></code> of <code class="docutils literal notranslate"><span class="pre">obj1</span></code> to <code class="docutils literal notranslate"><span class="pre">obj2</span></code>.</p>
</dd></dl>

<p>The following classes are used as base classes by the generated stub packages to
represent AppleScript classes and properties in Python:</p>
<dl class="class">
<dt id="aetypes.ComponentItem">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">ComponentItem</code><span class="sig-paren">(</span><em>which</em><span class="optional">[</span>, <em>fr</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.ComponentItem" title="Permalink to this definition">¶</a></dt>
<dd><p>Abstract baseclass for an OSA class. The subclass should set the class attribute
<code class="docutils literal notranslate"><span class="pre">want</span></code> to the 4-character OSA class code. Instances of subclasses of this
class are equivalent to AppleScript Object Specifiers. Upon instantiation you
should pass a selector in <code class="docutils literal notranslate"><span class="pre">which</span></code>, and optionally a parent object in <code class="docutils literal notranslate"><span class="pre">fr</span></code>.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.NProperty">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">NProperty</code><span class="sig-paren">(</span><em>fr</em><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.NProperty" title="Permalink to this definition">¶</a></dt>
<dd><p>Abstract baseclass for an OSA property. The subclass should set the class
attributes <code class="docutils literal notranslate"><span class="pre">want</span></code> and <code class="docutils literal notranslate"><span class="pre">which</span></code> to designate which property we are talking
about. Instances of subclasses of this class are Object Specifiers.</p>
</dd></dl>

<dl class="class">
<dt id="aetypes.ObjectSpecifier">
<em class="property">class </em><code class="descclassname">aetypes.</code><code class="descname">ObjectSpecifier</code><span class="sig-paren">(</span><em>want</em>, <em>form</em>, <em>seld</em><span class="optional">[</span>, <em>fr</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#aetypes.ObjectSpecifier" title="Permalink to this definition">¶</a></dt>
<dd><p>Base class of <code class="docutils literal notranslate"><span class="pre">ComponentItem</span></code> and <code class="docutils literal notranslate"><span class="pre">NProperty</span></code>, a general OSA Object
Specifier. See the Apple Open Scripting Architecture documentation for the
parameters. Note that this class is not abstract.</p>
</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="aepack.html"
                        title="previous chapter">38.3. <code class="xref py py-mod docutils literal notranslate"><span class="pre">aepack</span></code> — Conversion between Python variables and AppleEvent data containers</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="miniaeframe.html"
                        title="next chapter">38.5. <code class="xref py py-mod docutils literal notranslate"><span class="pre">MiniAEFrame</span></code> — Open Scripting Architecture server support</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/library/aetypes.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>  
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="miniaeframe.html" title="38.5. MiniAEFrame — Open Scripting Architecture server support"
             >next</a> |</li>
        <li class="right" >
          <a href="aepack.html" title="38.3. aepack — Conversion between Python variables and AppleEvent data containers"
             >previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &#187;</li>
        <li>
          <a href="../index.html">Python 2.7.17 documentation</a> &#187;
        </li>

          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="macosa.html" >38. MacPython OSA Modules</a> &#187;</li> 
      </ul>
    </div>  
    <div class="footer">
    &copy; <a href="../copyright.html">Copyright</a> 1990-2019, Python Software Foundation.
    <br />
    The Python Software Foundation is a non-profit corporation.
    <a href="https://www.python.org/psf/donations/">Please donate.</a>
    <br />
    Last updated on Oct 19, 2019.
    <a href="../bugs.html">Found a bug</a>?
    <br />
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 2.0.1.
    </div>

  </body>
</html>