This file is indexed.

/usr/share/doc/python-pytango-doc/html/faq.html is in python-pytango-doc 8.1.5-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
<!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>FAQ &mdash; PyTango 8.1.5 documentation</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:     '8.1.5',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </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>
    <link rel="shortcut icon" href="_static/logo.ico"/>
    <link rel="top" title="PyTango 8.1.5 documentation" href="index.html" />
    <link rel="next" title="PyTango Enhancement Proposals" href="tep.html" />
    <link rel="prev" title="How to" href="howto.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="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="tep.html" title="PyTango Enhancement Proposals"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="howto.html" title="How to"
             accesskey="P">previous</a> |</li>
    <li><a href="index.html">home</a>|&nbsp;</li>
    <li><a href="start.html">getting started</a>|&nbsp;</li>
    <li><a href="quicktour.html">quick tour</a>|&nbsp;</li>
    <li><a href="howto.html">how to</a>|&nbsp;</li>
    <li><a href="#">FAQ</a>|&nbsp;</li>
    <li><a href="contents.html">documentation </a> &raquo;</li>
 
      </ul>
    </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="contents.html">
              <img class="logo" src="_static/logo.png" alt="Logo"/>
            </a></p>
  <h4>Previous topic</h4>
  <p class="topless"><a href="howto.html"
                        title="previous chapter">How to</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="tep.html"
                        title="next chapter">PyTango Enhancement Proposals</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/faq.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <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="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="faq">
<span id="pytango-faq"></span><h1>FAQ<a class="headerlink" href="#faq" title="Permalink to this headline">ΒΆ</a></h1>
<p>Answers to general Tango questions can be found at <a class="reference external" href="http://www.tango-controls.org/tutorials">http://www.tango-controls.org/tutorials</a></p>
<p>Please also check <a class="reference external" href="http://www.tango-controls.org/howtos">http://www.tango-controls.org/howtos</a> for a list of Tango howtos</p>
<p><strong>Where are the usual bjam files?</strong></p>
<p>Starting from PyTango 7.0.0 the prefered way to build PyTango is using the standard
python distutils package. This means that:</p>
<ul class="simple">
<li>you do NOT have to install the additional bjam package</li>
<li>you do NOT have to change 3 configuration files</li>
<li>you do NOT need to have 2Gb of RAM to compile PyTango.</li>
</ul>
<p>Please check the compilation chapter for details on how to build PyTango.</p>
<p><strong>I got a libbost_python error when I try to import PyTango module</strong></p>
<dl class="docutils">
<dt>doing:</dt>
<dd><div class="first last highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">PyTango</span>
<span class="go">ImportError: libboost_python-gcc43-mt-1_38.so.1.38.0: cannot open shared object file: No such file or directory</span>
</pre></div>
</div>
</dd>
</dl>
<p>You must check that you have the correct boost python installed on your computer.
To see which boost python file PyTango needs type:</p>
<div class="highlight-python"><div class="highlight"><pre>$ ldd /usr/lib/python2.5/site-packages/PyTango/_PyTango.so
linux-vdso.so.1 =&gt;  (0x00007fff48bfe000)
libtango.so.7 =&gt; /home/homer/local/lib/libtango.so.7 (0x00007f393fabb000)
liblog4tango.so.4 =&gt; /home/homer/local/lib/liblog4tango.so.4 (0x00007f393f8a0000)
**libboost_python-gcc43-mt-1_38.so.1.38.0 =&gt; not found**
libpthread.so.0 =&gt; /lib/libpthread.so.0 (0x00007f393f65e000)
librt.so.1 =&gt; /lib/librt.so.1 (0x00007f393f455000)
libdl.so.2 =&gt; /lib/libdl.so.2 (0x00007f393f251000)
libomniORB4.so.1 =&gt; /usr/local/lib/libomniORB4.so.1 (0x00007f393ee99000)
libomniDynamic4.so.1 =&gt; /usr/local/lib/libomniDynamic4.so.1 (0x00007f393e997000)
libomnithread.so.3 =&gt; /usr/local/lib/libomnithread.so.3 (0x00007f393e790000)
libCOS4.so.1 =&gt; /usr/local/lib/libCOS4.so.1 (0x00007f393e359000)
libgcc_s.so.1 =&gt; /lib/libgcc_s.so.1 (0x00007f393e140000)
libc.so.6 =&gt; /lib/libc.so.6 (0x00007f393ddce000)
libstdc++.so.6 =&gt; /usr/lib/libstdc++.so.6 (0x00007f393dac1000)
libm.so.6 =&gt; /lib/libm.so.6 (0x00007f393d83b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3940a4c000)
</pre></div>
</div>
<p><strong>My python code uses PyTango 3.0.4 API. How do I change to 7.0.0 API?</strong></p>
<p>To ease migration effort, PyTango 7 provides an alternative module called
PyTango3.</p>
<p>Changing your python import from:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">PyTango</span>
</pre></div>
</div>
<p>to:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">PyTango3</span> <span class="kn">as</span> <span class="nn">PyTango</span>
</pre></div>
</div>
<p>should allow you to execute your old PyTango code using the new PyTango 7 library.</p>
<p>Please note that you should as soon as possible migrate the code to Tango 7
since the PyTango team cannot assure the maintainability of the PyTango3 module.</p>
<p>Please find below a basic set of rules to migrate from PyTango 3.0.x to 7:</p>
<p><em>General rule of thumb for data types</em></p>
<p>The first important thing to be aware of when migrating from PyTango &lt;= 3.0.4 to
PyTango &gt;= 7 is that the data type mapping from tango to python and vice versa is
not always the same. The following table summarizes the differences:</p>
<table border="1" class="docutils">
<colgroup>
<col width="23%" />
<col width="39%" />
<col width="39%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Tango data type</th>
<th class="head">PyTango 7 type</th>
<th class="head">PyTango &lt;= 3.0.4 type</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>DEV_VOID</td>
<td>No data</td>
<td>No data</td>
</tr>
<tr class="row-odd"><td>DEV_BOOLEAN</td>
<td>bool</td>
<td>bool</td>
</tr>
<tr class="row-even"><td>DEV_SHORT</td>
<td>int</td>
<td>int</td>
</tr>
<tr class="row-odd"><td>DEV_LONG</td>
<td>int</td>
<td>int</td>
</tr>
<tr class="row-even"><td>DEV_LONG64</td>
<td>long (on a 32 bits computer) or
int (on a 64 bits computer)</td>
<td>long (on a 32 bits computer) or
int (on a 64 bits computer)</td>
</tr>
<tr class="row-odd"><td>DEV_FLOAT</td>
<td>float</td>
<td>float</td>
</tr>
<tr class="row-even"><td>DEV_DOUBLE</td>
<td>float</td>
<td>float</td>
</tr>
<tr class="row-odd"><td>DEV_USHORT</td>
<td>int</td>
<td>int</td>
</tr>
<tr class="row-even"><td>DEV_ULONG</td>
<td>int</td>
<td>int</td>
</tr>
<tr class="row-odd"><td>DEV_ULONG64</td>
<td>long (on a 32 bits computer) or
int (on a 64 bits computer)</td>
<td>long (on a 32 bits computer) or
int (on a 64 bits computer)</td>
</tr>
<tr class="row-even"><td>DEV_STRING</td>
<td>str</td>
<td>str</td>
</tr>
<tr class="row-odd"><td>DEVVAR_CHARARRAY</td>
<td>sequence&lt;int&gt;</td>
<td>list&lt;int&gt;</td>
</tr>
<tr class="row-even"><td>DEVVAR_SHORTARRAY</td>
<td>sequence&lt;int&gt;</td>
<td>list&lt;int&gt;</td>
</tr>
<tr class="row-odd"><td>DEVVAR_LONGARRAY</td>
<td>sequence&lt;int&gt;</td>
<td>list&lt;int&gt;</td>
</tr>
<tr class="row-even"><td>DEVVAR_LONG64ARRAY</td>
<td>sequence&lt;long&gt; (on a 32 bits computer) or
sequence&lt;int&gt; (on a 64 bits computer)</td>
<td>list&lt;long&gt; (on a 32 bits computer) or
list&lt;int&gt; (on a 64 bits computer)</td>
</tr>
<tr class="row-odd"><td>DEVVAR_FLOATARRAY</td>
<td>sequence&lt;float&gt;</td>
<td>list&lt;float&gt;</td>
</tr>
<tr class="row-even"><td>DEVVAR_DOUBLEARRAY</td>
<td>sequence&lt;float&gt;</td>
<td>list&lt;float&gt;</td>
</tr>
<tr class="row-odd"><td>DEVVAR_USHORTARRAY</td>
<td>sequence&lt;int&gt;</td>
<td>list&lt;int&gt;</td>
</tr>
<tr class="row-even"><td>DEVVAR_ULONGARRAY</td>
<td>sequence&lt;int&gt;</td>
<td>list&lt;int&gt;</td>
</tr>
<tr class="row-odd"><td>DEVVAR_ULONG64ARRAY</td>
<td>sequence&lt;long&gt; (on a 32 bits computer) or
sequence&lt;int&gt; (on a 64 bits computer)</td>
<td>list&lt;long&gt; (on a 32 bits computer) or
list&lt;int&gt; (on a 64 bits computer)</td>
</tr>
<tr class="row-even"><td>DEVVAR_STRINGARRAY</td>
<td>sequence&lt;str&gt;</td>
<td>list&lt;str&gt;</td>
</tr>
<tr class="row-odd"><td>DEVVAR_LONGSTRINGARRAY</td>
<td>A sequence with two elements:
1. sequence&lt;int&gt;
2. sequence&lt;str&gt;</td>
<td><dl class="first last docutils">
<dt>A list with two elements:</dt>
<dd><ol class="first last arabic simple">
<li>list&lt;int&gt;</li>
<li>list&lt;str&gt;</li>
</ol>
</dd>
</dl>
</td>
</tr>
<tr class="row-even"><td>DEVVAR_DOUBLESTRINGARRAY</td>
<td>A sequence with two elements:
1. sequence&lt;float&gt;
2. sequence&lt;str&gt;</td>
<td><dl class="first last docutils">
<dt>A list with two elements:</dt>
<dd><ol class="first last arabic simple">
<li>list&lt;float&gt;</li>
<li>list&lt;str&gt;</li>
</ol>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p>Note that starting from PyTango 7 you <strong>cannot assume anything</strong> about the concrete
sequence implementation for the tango array types in PyTango.
This means that the following code (valid in PyTango &lt;= 3.0.4):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">PyTango</span>
<span class="n">dp</span> <span class="o">=</span> <span class="n">PyTango</span><span class="o">.</span><span class="n">DeviceProxy</span><span class="p">(</span><span class="s">&quot;my/device/experiment&quot;</span><span class="p">)</span>
<span class="n">da</span> <span class="o">=</span> <span class="n">dp</span><span class="o">.</span><span class="n">read_attribute</span><span class="p">(</span><span class="s">&quot;array_attr&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">da</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
    <span class="k">print</span> <span class="s">&quot;array_attr is NOT a scalar attribute&quot;</span>
</pre></div>
</div>
<p>must be replaced with:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">operator</span><span class="o">,</span> <span class="nn">types</span>
<span class="kn">import</span> <span class="nn">PyTango</span>
<span class="n">dp</span> <span class="o">=</span> <span class="n">PyTango</span><span class="o">.</span><span class="n">DeviceProxy</span><span class="p">(</span><span class="s">&quot;my/device/experiment&quot;</span><span class="p">)</span>
<span class="n">da</span> <span class="o">=</span> <span class="n">dp</span><span class="o">.</span><span class="n">read_attribute</span><span class="p">(</span><span class="s">&quot;array_attr&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">operator</span><span class="o">.</span><span class="n">isSequence</span><span class="p">(</span><span class="n">da</span><span class="o">.</span><span class="n">value</span><span class="p">)</span> <span class="ow">and</span> <span class="ow">not</span> <span class="nb">type</span><span class="p">(</span><span class="n">da</span><span class="o">.</span><span class="n">value</span><span class="p">)</span> <span class="ow">in</span> <span class="n">types</span><span class="o">.</span><span class="n">StringTypes</span><span class="p">:</span>
    <span class="k">print</span> <span class="s">&quot;array_attr is NOT a scalar attribute&quot;</span>
</pre></div>
</div>
<p>Note that the above example is intended for demonstration purposes only. For
reference, the proper code would be:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">PyTango</span>
<span class="n">dp</span> <span class="o">=</span> <span class="n">PyTango</span><span class="o">.</span><span class="n">DeviceProxy</span><span class="p">(</span><span class="s">&quot;my/device/experiment&quot;</span><span class="p">)</span>
<span class="n">da</span> <span class="o">=</span> <span class="n">dp</span><span class="o">.</span><span class="n">read_attribute</span><span class="p">(</span><span class="s">&quot;array_attr&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">da</span><span class="o">.</span><span class="n">data_format</span> <span class="ow">is</span> <span class="n">PyTango</span><span class="o">.</span><span class="n">AttrDataFormat</span><span class="o">.</span><span class="n">SCALAR</span><span class="p">:</span>
    <span class="k">print</span> <span class="s">&quot;array_attr is NOT a scalar attribute&quot;</span>
</pre></div>
</div>
<p><em>Server</em></p>
<ol class="arabic">
<li><p class="first">replace <cite>PyTango.PyUtil</cite> with <a class="reference internal" href="server_api/util.html#PyTango.Util" title="PyTango.Util"><tt class="xref py py-class docutils literal"><span class="pre">Util</span></tt></a></p>
</li>
<li><p class="first">replace <cite>PyTango.PyDeviceClass</cite> with <a class="reference internal" href="server_api/device_class.html#PyTango.DeviceClass" title="PyTango.DeviceClass"><tt class="xref py py-class docutils literal"><span class="pre">DeviceClass</span></tt></a></p>
</li>
<li><dl class="first docutils">
<dt>state and status overwrite</dt>
<dd><p class="first">in PyTango &lt;= 3.0.4, in order to overwrite the default state and status in a device
server, you had to reimplement <strong>State()</strong> and <strong>Status()</strong> methods respectively.</p>
<p class="last">in PyTango 7 the methods have been renamed to <strong>dev_state()</strong> and <strong>dev_status()</strong> in
order to match the C++ API.</p>
</dd>
</dl>
</li>
</ol>
<p><em>General</em></p>
<ol class="arabic">
<li><dl class="first docutils">
<dt>AttributeValue does <strong>NOT</strong> exist anymore.</dt>
<dd><ul class="first simple">
<li>the result of a read_attribute call on a <a class="reference internal" href="client_api/device_proxy.html#PyTango.DeviceProxy" title="PyTango.DeviceProxy"><tt class="xref py py-class docutils literal"><span class="pre">DeviceProxy</span></tt></a> / <a class="reference internal" href="client_api/group.html#PyTango.Group" title="PyTango.Group"><tt class="xref py py-class docutils literal"><span class="pre">Group</span></tt></a>
is now a <a class="reference internal" href="client_api/miscellaneous.html#PyTango.DeviceAttribute" title="PyTango.DeviceAttribute"><tt class="xref py py-class docutils literal"><span class="pre">DeviceAttribute</span></tt></a> object</li>
<li>write_attribute does not accept AttributeValue anymore</li>
</ul>
<p class="last">(See <a class="reference internal" href="client_api/device_proxy.html#PyTango.DeviceProxy" title="PyTango.DeviceProxy"><tt class="xref py py-class docutils literal"><span class="pre">DeviceProxy</span></tt></a> API documentation for more details)</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>command_inout for commands with parameter type DevVar****StringArray don&#8217;t accept items in second sequence not being strings:</dt>
<dd><p class="first">For example, a tango command &#8216;DevVoid Go(DevVarDoubleArray)&#8217; in tango 3.0.4
could be executed by calling:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">dev_proxy</span><span class="o">.</span><span class="n">command_inout</span><span class="p">(</span> <span class="s">&#39;Go&#39;</span><span class="p">,</span> <span class="p">[[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">2.0</span><span class="p">],</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">]]</span> <span class="p">)</span>
</pre></div>
</div>
<p>and the second list would internally be converted to [&#8216;1&#8217;, &#8216;2&#8217;, &#8216;3&#8217;].
Starting from PyTango 7 this is not allowed anymore. So the above code
must be changed to:</p>
<div class="last highlight-python"><div class="highlight"><pre><span class="n">dev_proxy</span><span class="o">.</span><span class="n">command_inout</span><span class="p">(</span> <span class="s">&#39;Go&#39;</span><span class="p">,</span> <span class="p">[[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">2.0</span><span class="p">],</span> <span class="p">[</span><span class="s">&#39;1&#39;</span><span class="p">,</span> <span class="s">&#39;2&#39;</span><span class="p">,</span> <span class="s">&#39;3&#39;</span><span class="p">]]</span> <span class="p">)</span>
</pre></div>
</div>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference internal" href="client_api/other.html#PyTango.EventType" title="PyTango.EventType"><tt class="xref py py-class docutils literal"><span class="pre">EventType</span></tt></a> enumeration constants changed to match C++ enumeration</dt>
<dd><ul class="first last simple">
<li>CHANGE -&gt; CHANGE_EVENT</li>
<li>QUALITY -&gt; QUALITY_EVENT</li>
<li>PERIODIC -&gt; PERIODIC_EVENT</li>
<li>ARCHIVE -&gt; ARCHIVE_EVENT</li>
<li>USER -&gt; USER_EVENT</li>
<li>ATTR_CONF_EVENT remains</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>Exception handling</dt>
<dd><p class="first">in 3.0.4 <a class="reference internal" href="exception.html#PyTango.DevFailed" title="PyTango.DevFailed"><tt class="xref py py-class docutils literal"><span class="pre">DevFailed</span></tt></a> was a tuple of dictionaries.
Now <a class="reference internal" href="exception.html#PyTango.DevFailed" title="PyTango.DevFailed"><tt class="xref py py-class docutils literal"><span class="pre">DevFailed</span></tt></a> is a tuple of <a class="reference internal" href="exception.html#PyTango.DevError" title="PyTango.DevError"><tt class="xref py py-class docutils literal"><span class="pre">DevError</span></tt></a>.
This means that code:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">try</span><span class="p">:</span>
    <span class="n">tango_fail</span><span class="p">()</span>
<span class="k">except</span> <span class="n">PyTango</span><span class="o">.</span><span class="n">DevFailed</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
    <span class="k">print</span> <span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="s">&#39;reason&#39;</span><span class="p">]</span>
</pre></div>
</div>
<p>needs to be replaced with:</p>
<div class="last highlight-python"><div class="highlight"><pre><span class="k">try</span><span class="p">:</span>
    <span class="n">tango_fail</span><span class="p">()</span>
<span class="k">except</span> <span class="n">PyTango</span><span class="o">.</span><span class="n">DevFailed</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
    <span class="k">print</span> <span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">reason</span>
</pre></div>
</div>
</dd>
</dl>
</li>
</ol>
<p><em>Optional</em></p>
<p>The following is a list of API improvements. Some where added for performance
reasons, others to allow for a more pythonic interface, others still to reflect
more adequately the C++ interface. They are not mandatory since the original
interface will still be available.</p>
<p><strong>Why is there a &#8220;-Wstrict-prototypes&#8221; warning when I compile PyTango?</strong></p>
<p>The PyTango prefered build system (distutils) uses the same flags used to compile
Python to compile PyTango. It happens that Python is compiled as a pure C library
while PyTango is a C++ library. Unfortunately one of the flags used by Python is
the &#8220;-Wstrict-prototypes&#8221; which makes sence in a C compilation but not in a C++
compilation.
For reference here is the complete error message you may have:</p>
<blockquote>
<div><cite>cc1plus: warning: command line option &#8220;-Wstrict-prototypes&#8221; is valid for Ada/C/ObjC but not for C++</cite></div></blockquote>
<p>Do not worry about this warning since the compiler is ignoring the presence of this flag
in the compilation.</p>
<p><strong>Why are there so many warnings when generating the documentation?</strong></p>
<p>PyTango uses boost python for the binding between C++ and Python and sphinx for
document generation.
When sphinx generates the PyTango API documentation it uses introspection to search
for documentation in the python code. It happens that boost overrides some python
introspection API for functions and methods which sphinx expects to have. Therefore
you should see many warnings of type:</p>
<blockquote>
<div><cite>(WARNING/2) error while formatting signature for PyTango.Device_4Impl.always_executed_hook: **arg is not a Python function**</cite></div></blockquote>
<p>Do not worry since sphinx is able to generate the proper documentation.</p>
</div>


          </div>
        </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="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="tep.html" title="PyTango Enhancement Proposals"
             >next</a> |</li>
        <li class="right" >
          <a href="howto.html" title="How to"
             >previous</a> |</li>
    <li><a href="index.html">home</a>|&nbsp;</li>
    <li><a href="start.html">getting started</a>|&nbsp;</li>
    <li><a href="quicktour.html">quick tour</a>|&nbsp;</li>
    <li><a href="howto.html">how to</a>|&nbsp;</li>
    <li><a href="#">FAQ</a>|&nbsp;</li>
    <li><a href="contents.html">documentation </a> &raquo;</li>
 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright Except where otherwise noted, content on this site is
licensed under a Creative Commons Attribution 3.0 License.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>