You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sip4-tqt/doc/html/command_line.html

259 lines
14 KiB

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The SIP Command Line &mdash; SIP 4.10.5 Reference Guide</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '#',
VERSION: '4.10.5',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="SIP 4.10.5 Reference Guide" href="index.html" />
<link rel="next" title="SIP Specification Files" href="specification_files.html" />
<link rel="prev" title="Using SIP" href="using.html" />
</head>
<body>
<div class="related">
<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="modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li class="right" >
<a href="specification_files.html" title="SIP Specification Files"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="using.html" title="Using SIP"
accesskey="P">previous</a> |</li>
<li><a href="index.html">SIP 4.10.5 Reference Guide</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="the-sip-command-line">
<span id="ref-command-line"></span><h1>The SIP Command Line<a class="headerlink" href="#the-sip-command-line" title="Permalink to this headline"></a></h1>
<p>The syntax of the SIP command line is:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">sip</span> <span class="p">[</span><span class="n">options</span><span class="p">]</span> <span class="p">[</span><span class="n">specification</span><span class="p">]</span>
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">specification</span></tt> is the name of the specification file for the module. If it
is omitted then <tt class="docutils literal"><span class="pre">stdin</span></tt> is used.</p>
<p>The full set of command line options is:</p>
<dl class="cmdoption">
<dt id="cmdoption-sip-h">
<tt class="descname">-h</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-h" title="Permalink to this definition"></a></dt>
<dd>Display a help message.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-V">
<tt class="descname">-V</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-V" title="Permalink to this definition"></a></dt>
<dd>Display the SIP version number.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-a">
<tt class="descname">-a</tt><tt class="descclassname"> &lt;FILE&gt;</tt><a class="headerlink" href="#cmdoption-sip-a" title="Permalink to this definition"></a></dt>
<dd>The name of the TQScintilla API file to generate. This file contains a
description of the module API in a form that the TQScintilla editor
component can use for auto-completion and call tips. (The file may also be
used by the SciTE editor but must be sorted first.) By default the file is
not generated.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-b">
<tt class="descname">-b</tt><tt class="descclassname"> &lt;FILE&gt;</tt><a class="headerlink" href="#cmdoption-sip-b" title="Permalink to this definition"></a></dt>
<dd>The name of the build file to generate. This file contains the information
about the module needed by the <a class="reference external" href="build_system.html#ref-build-system"><em>SIP build system</em></a>
to generate a platform and compiler specific Makefile for the module. By
default the file is not generated.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-c">
<tt class="descname">-c</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-sip-c" title="Permalink to this definition"></a></dt>
<dd>The name of the directory (which must exist) into which all of the
generated C or C++ code is placed. By default no code is generated.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-d">
<tt class="descname">-d</tt><tt class="descclassname"> &lt;FILE&gt;</tt><a class="headerlink" href="#cmdoption-sip-d" title="Permalink to this definition"></a></dt>
<dd>The name of the documentation file to generate. Documentation is included
in specification files using the <a class="reference external" href="directives.html#directive-%Doc"><tt class="xref docutils literal"><span class="pre">%Doc</span></tt></a> and
<a class="reference external" href="directives.html#directive-%ExportedDoc"><tt class="xref docutils literal"><span class="pre">%ExportedDoc</span></tt></a> directives. By default the file is not
generated.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-e">
<tt class="descname">-e</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-e" title="Permalink to this definition"></a></dt>
<dd>Support for C++ exceptions is enabled. This causes all calls to C++ code
to be enclosed in <tt class="docutils literal"><span class="pre">try</span></tt>/<tt class="docutils literal"><span class="pre">catch</span></tt> blocks and C++ exceptions to be
converted to Python exceptions. By default exception support is disabled.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-g">
<tt class="descname">-g</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-g" title="Permalink to this definition"></a></dt>
<dd>The Python GIL is released before making any calls to the C/C++ library
being wrapped and reacquired afterwards. See <a class="reference external" href="using.html#ref-gil"><em>The Python Global Interpreter Lock</em></a> and the
<a class="reference external" href="annotations.html#fanno-ReleaseGIL"><tt class="xref docutils literal"><span class="pre">ReleaseGIL</span></tt></a> and <a class="reference external" href="annotations.html#fanno-HoldGIL"><tt class="xref docutils literal"><span class="pre">HoldGIL</span></tt></a> annotations.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-I">
<tt class="descname">-I</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-sip-I" title="Permalink to this definition"></a></dt>
<dd>The directory is added to the list of directories searched when looking for
a specification file given in an <a class="reference external" href="directives.html#directive-%Include"><tt class="xref docutils literal"><span class="pre">%Include</span></tt></a> or
<a class="reference external" href="directives.html#directive-%Import"><tt class="xref docutils literal"><span class="pre">%Import</span></tt></a> directive. This option may be given any number of
times.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-j">
<tt class="descname">-j</tt><tt class="descclassname"> &lt;NUMBER&gt;</tt><a class="headerlink" href="#cmdoption-sip-j" title="Permalink to this definition"></a></dt>
<dd>The generated code is split into the given number of files. This makes it
easier to use the parallel build facility of most modern implementations of
<tt class="docutils literal"><span class="pre">make</span></tt>. By default 1 file is generated for each C structure or C++
class.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-k">
<tt class="descname">-k</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-k" title="Permalink to this definition"></a></dt>
<dd><p>
<span class="versionmodified">New in version 4.10.</span></p>
<p>All functions and methods will, by default, support passing parameters
using the Python keyword argument syntax.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-o">
<tt class="descname">-o</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-o" title="Permalink to this definition"></a></dt>
<dd><p>
<span class="versionmodified">New in version 4.10.</span></p>
<p>Docstrings will be automatically generated that describe the signature of
all functions, methods and constructors.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-p">
<tt class="descname">-p</tt><tt class="descclassname"> &lt;MODULE&gt;</tt><a class="headerlink" href="#cmdoption-sip-p" title="Permalink to this definition"></a></dt>
<dd>The name of the <a class="reference external" href="directives.html#directive-%ConsolidatedModule"><tt class="xref docutils literal"><span class="pre">%ConsolidatedModule</span></tt></a> which will contain the
wrapper code for this component module.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-P">
<tt class="descname">-P</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-P" title="Permalink to this definition"></a></dt>
<dd><p>
<span class="versionmodified">New in version 4.10.</span></p>
<p>By default SIP generates code to provide access to protected C++ functions
from Python. On some platforms (notably Linux, but not Windows) this code
can be avoided if the <tt class="docutils literal"><span class="pre">protected</span></tt> keyword is redefined as <tt class="docutils literal"><span class="pre">public</span></tt>
during compilation. This can result in a significant reduction in the size
of a generated Python module. This option disables the generation of the
extra code.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-r">
<tt class="descname">-r</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-r" title="Permalink to this definition"></a></dt>
<dd>Debugging statements that trace the execution of the bindings are
automatically generated. By default the statements are not generated.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-s">
<tt class="descname">-s</tt><tt class="descclassname"> &lt;SUFFIX&gt;</tt><a class="headerlink" href="#cmdoption-sip-s" title="Permalink to this definition"></a></dt>
<dd>The suffix to use for generated C or C++ source files. By default <tt class="docutils literal"><span class="pre">.c</span></tt>
is used for C and <tt class="docutils literal"><span class="pre">.cpp</span></tt> for C++.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-t">
<tt class="descname">-t</tt><tt class="descclassname"> &lt;TAG&gt;</tt><a class="headerlink" href="#cmdoption-sip-t" title="Permalink to this definition"></a></dt>
<dd>The SIP version tag (declared using a <a class="reference external" href="directives.html#directive-%Timeline"><tt class="xref docutils literal"><span class="pre">%Timeline</span></tt></a> directive) or
the SIP platform tag (declared using the <a class="reference external" href="directives.html#directive-%Platforms"><tt class="xref docutils literal"><span class="pre">%Platforms</span></tt></a> directive)
to generate code for. This option may be given any number of times so long
as the tags do not conflict.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-w">
<tt class="descname">-w</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-w" title="Permalink to this definition"></a></dt>
<dd>The display of warning messages is enabled. By default warning messages
are disabled.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-x">
<tt class="descname">-x</tt><tt class="descclassname"> &lt;FEATURE&gt;</tt><a class="headerlink" href="#cmdoption-sip-x" title="Permalink to this definition"></a></dt>
<dd>The feature (declared using the <a class="reference external" href="directives.html#directive-%Feature"><tt class="xref docutils literal"><span class="pre">%Feature</span></tt></a> directive) is
disabled.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-z">
<tt class="descname">-z</tt><tt class="descclassname"> &lt;FILE&gt;</tt><a class="headerlink" href="#cmdoption-sip-z" title="Permalink to this definition"></a></dt>
<dd>The name of a file containing more command line options.</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="using.html"
title="previous chapter">Using SIP</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="specification_files.html"
title="next chapter">SIP Specification Files</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<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="modindex.html" title="Global Module Index"
>modules</a> |</li>
<li class="right" >
<a href="specification_files.html" title="SIP Specification Files"
>next</a> |</li>
<li class="right" >
<a href="using.html" title="Using SIP"
>previous</a> |</li>
<li><a href="index.html">SIP 4.10.5 Reference Guide</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2010 Riverbank Computing Limited.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>