This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
glossary.html
600 lines (481 loc) · 49.9 KB
/
glossary.html
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
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Glossary — sardana 3.1.2-alpha documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Docs for other Sardana versions" href="other_versions.html" />
<link rel="prev" title="What’s new?" href="news.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> sardana
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
3.1
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference external" href="http://www.sardana-controls.org">Home Page</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/sardana-org/sardana">Project Page</a></li>
<li class="toctree-l1"><a class="reference external" href="http://pypi.python.org/pypi/sardana">Download from PyPI</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="docs.html">Documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="users/index.html">User’s Guide</a></li>
<li class="toctree-l2"><a class="reference internal" href="devel/index.html">Developer’s Guide</a></li>
<li class="toctree-l2"><a class="reference internal" href="sep/index.html">Sardana Enhancement Proposals</a></li>
<li class="toctree-l2"><a class="reference internal" href="news.html">What's new?</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Glossary</a></li>
<li class="toctree-l2"><a class="reference internal" href="other_versions.html">Docs for other Sardana versions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="http://github.com/sardana-org/sardana-plugins">Plugins Catalogue</a></li>
<li class="toctree-l1"><a class="reference external" href="http://github.com/sardana-org/sardana/wiki">Wiki</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">sardana</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> »</li>
<li><a href="docs.html">Sardana 3.1 Documentation</a> »</li>
<li>Glossary</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/glossary.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="glossary">
<span id="sardana-glossary"></span><h1>Glossary<a class="headerlink" href="#glossary" title="Permalink to this headline">¶</a></h1>
<dl class="glossary">
<dt id="term-..."><code class="docutils literal notranslate"><span class="pre">...</span></code><a class="headerlink" href="#term-..." title="Permalink to this term">¶</a></dt><dd><p>The default Python prompt of the interactive shell when entering code for
an indented code block or within a pair of matching left and right
delimiters (parentheses, square brackets or curly braces).</p>
</dd>
<dt id="term-0"><code class="docutils literal notranslate"><span class="pre">>>></span></code><a class="headerlink" href="#term-0" title="Permalink to this term">¶</a></dt><dd><p>The default Python prompt of the interactive shell. Often seen for code
examples which can be executed interactively in the interpreter.</p>
</dd>
<dt id="term-ADC">ADC<a class="headerlink" href="#term-ADC" title="Permalink to this term">¶</a></dt><dd><p>In electronics, an analog-to-digital converter (ADC) is a system that
converts an analog signal e.g. voltage into its digital representation.</p>
</dd>
<dt id="term-API">API<a class="headerlink" href="#term-API" title="Permalink to this term">¶</a></dt><dd><p>An application programming interface (API) is a particular set of rules
and specifications that software programs can follow to communicate with
each other. It serves as an interface between different software
programs and facilitates their interaction, similar to the way the user
interface facilitates interaction between humans and computers.
An API can be created for applications, libraries, operating systems,
etc., as a way of defining their “vocabularies” and resources request
conventions (e.g. function-calling conventions). It may include
specifications for routines, data structures, object classes, and
protocols used to communicate between the consumer program and the
implementer program of the API.</p>
</dd>
<dt id="term-argument">argument<a class="headerlink" href="#term-argument" title="Permalink to this term">¶</a></dt><dd><p>A value passed to a function or method, assigned to a named local
variable in the function body. A function or method may have both
positional arguments and keyword arguments in its definition.
Positional and keyword arguments may be variable-length: <code class="docutils literal notranslate"><span class="pre">*</span></code> accepts
or passes (if in the function definition or call) several positional
arguments in a list, while <code class="docutils literal notranslate"><span class="pre">**</span></code> does the same for keyword arguments
in a dictionary.</p>
<p>Any expression may be used within the argument list, and the evaluated
value is passed to the local variable.</p>
</dd>
<dt id="term-attribute">attribute<a class="headerlink" href="#term-attribute" title="Permalink to this term">¶</a></dt><dd><p>A value associated with an object which is referenced by name using
dotted expressions. For example, if an object <em>o</em> has an attribute
<em>a</em> it would be referenced as <em>o.a</em>.</p>
<p>dictionary
An associative array, where arbitrary keys are mapped to values. The
keys can be any object with <code class="xref py py-meth docutils literal notranslate"><span class="pre">__hash__()</span></code> and <code class="xref py py-meth docutils literal notranslate"><span class="pre">__eq__()</span></code> methods.
Called a hash in Perl.</p>
</dd>
<dt id="term-CCD">CCD<a class="headerlink" href="#term-CCD" title="Permalink to this term">¶</a></dt><dd><p>A charge-coupled device (CCD) is a device for the movement of electrical
charge, usually from within the device to an area where the charge can
be manipulated, for example conversion into a digital value. This is
achieved by “shifting” the signals between stages within the device one
at a time. CCDs move charge between capacitive bins in the device, with
the shift allowing for the transfer of charge between bins.</p>
</dd>
<dt id="term-class">class<a class="headerlink" href="#term-class" title="Permalink to this term">¶</a></dt><dd><p>A template for creating user-defined objects. Class definitions
normally contain method definitions which operate on instances of the
class.</p>
</dd>
<dt id="term-CLI">CLI<a class="headerlink" href="#term-CLI" title="Permalink to this term">¶</a></dt><dd><p>A command-line interface (CLI) is a mechanism for interacting with a
computer operating system or software by typing commands to perform
specific tasks. This text-only interface contrasts with the use of a
mouse pointer with a graphical user interface (<a class="reference internal" href="#term-GUI"><span class="xref std std-term">GUI</span></a>) to click on
options, or menus on a text user interface (TUI) to select options.
This method of instructing a computer to perform a given task is
referred to as “entering” a command: the system waits for the user
to conclude the submitting of the text command by pressing the “Enter”
key (a descendant of the “carriage return” key of a typewriter keyboard).
A command-line interpreter then receives, parses, and executes the
requested user command. The command-line interpreter may be run in a
text terminal or in a terminal emulator window as a remote shell client
such as PuTTY. Upon completion, the command usually returns output to
the user in the form of text lines on the CLI. This output may be an
answer if the command was a question, or otherwise a summary of the
operation.</p>
</dd>
<dt id="term-client-server-model">client-server model<a class="headerlink" href="#term-client-server-model" title="Permalink to this term">¶</a></dt><dd><p>The client-server model of computing is a distributed application
structure that partitions tasks or workloads between the providers of a
resource or service, called servers, and service requesters, called
clients. Often clients and servers communicate over a computer network
on separate hardware, but both client and server may reside in the same
system. A server machine is a host that is running one or more server
programs which share their resources with clients. A client does not
share any of its resources, but requests a server’s content or service
function. Clients therefore initiate communication sessions with servers
which await incoming requests.</p>
</dd>
<dt id="term-closed-loop">closed loop<a class="headerlink" href="#term-closed-loop" title="Permalink to this term">¶</a></dt><dd><p>A.k.a feedback loop, occurs when outputs of a system are routed back
as inputs as part of a chain of cause-and-effect that forms a circuit
or loop. In case of motion systems, closed loop positioning uses the
position sensors e.g. encoders to measure the system’s output. The
measured signal is looped back to the control unit as input and is used
to correct the moveable’s position.</p>
</dd>
<dt id="term-daemon">daemon<a class="headerlink" href="#term-daemon" title="Permalink to this term">¶</a></dt><dd><p>In Unix and other computer multitasking operating systems, a daemon is a
computer program that runs in the background, rather than under the
direct control of a user. They are usually initiated as background
processes. Typically daemons have names that end with the letter “d”: for
example, <em>syslogd</em>, the daemon that handles the system log, or <em>sshd</em>,
which handles incoming SSH connections.</p>
</dd>
<dt id="term-dial">dial<a class="headerlink" href="#term-dial" title="Permalink to this term">¶</a></dt><dd><p>See <a class="reference internal" href="#term-dial-position"><span class="xref std std-term">dial position</span></a></p>
</dd>
<dt id="term-dial-position">dial position<a class="headerlink" href="#term-dial-position" title="Permalink to this term">¶</a></dt><dd><p>Position in controller units (See also <a class="reference internal" href="#term-user-position"><span class="xref std std-term">user position</span></a>).</p>
</dd>
<dt id="term-expression">expression<a class="headerlink" href="#term-expression" title="Permalink to this term">¶</a></dt><dd><p>A piece of syntax which can be evaluated to some value. In other words,
an expression is an accumulation of expression elements like literals,
names, attribute access, operators or function calls which all return a
value. In contrast to many other languages, not all language constructs
are expressions. There are also <a class="reference internal" href="#term-statement"><span class="xref std std-term">statement</span></a>s which cannot be used
as expressions, such as <a class="reference external" href="https://docs.python.org/3/library/functions.html#print" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">print()</span></code></a> or <a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#if" title="(in Python v3.9)"><code class="xref std std-keyword docutils literal notranslate"><span class="pre">if</span></code></a>. Assignments
are also statements, not expressions.</p>
</dd>
<dt id="term-function">function<a class="headerlink" href="#term-function" title="Permalink to this term">¶</a></dt><dd><p>A series of statements which returns some value to a caller. It can also
be passed zero or more arguments which may be used in the execution of
the body. See also <a class="reference internal" href="#term-argument"><span class="xref std std-term">argument</span></a> and <a class="reference internal" href="#term-method"><span class="xref std std-term">method</span></a>.</p>
</dd>
<dt id="term-generator">generator<a class="headerlink" href="#term-generator" title="Permalink to this term">¶</a></dt><dd><p>A function which returns an iterator. It looks like a normal function
except that it contains <a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#yield" title="(in Python v3.9)"><code class="xref std std-keyword docutils literal notranslate"><span class="pre">yield</span></code></a> statements for producing a series
a values usable in a for-loop or that can be retrieved one at a time with
the <a class="reference external" href="https://docs.python.org/3/library/functions.html#next" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">next()</span></code></a> function. Each <a class="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#yield" title="(in Python v3.9)"><code class="xref std std-keyword docutils literal notranslate"><span class="pre">yield</span></code></a> temporarily suspends
processing, remembering the location execution state (including local
variables and pending try-statements). When the generator resumes, it
picks-up where it left-off (in contrast to functions which start fresh on
every invocation).</p>
</dd>
<dt id="index-0"><span id="term-generator-expression"></span>generator expression<a class="headerlink" href="#index-0" title="Permalink to this term">¶</a></dt><dd><p>An expression that returns an iterator. It looks like a normal expression
followed by a <a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#for" title="(in Python v3.9)"><code class="xref std std-keyword docutils literal notranslate"><span class="pre">for</span></code></a> expression defining a loop variable, range,
and an optional <a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#if" title="(in Python v3.9)"><code class="xref std std-keyword docutils literal notranslate"><span class="pre">if</span></code></a> expression. The combined expression
generates values for an enclosing function:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="nb">sum</span><span class="p">(</span><span class="n">i</span><span class="o">*</span><span class="n">i</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">10</span><span class="p">))</span> <span class="c1"># sum of squares 0, 1, 4, ... 81</span>
<span class="go">285</span>
</pre></div>
</div>
</dd>
<dt id="term-GUI">GUI<a class="headerlink" href="#term-GUI" title="Permalink to this term">¶</a></dt><dd><p>A graphical user interface (GUI) is a type of user interface that
allows users to interact with electronic devices with images rather
than text commands. GUIs can be used in computers, hand-held devices
such as MP3 players, portable media players or gaming devices,
household appliances and office equipment. A GUI represents the
information and actions available to a user through graphical icons and
visual indicators such as secondary notation, as opposed to text-based
interfaces (<a class="reference internal" href="#term-CLI"><span class="xref std std-term">CLI</span></a>), typed command labels or text navigation.
The actions are usually performed through direct manipulation of the
graphical elements.</p>
</dd>
<dt id="term-IDE">IDE<a class="headerlink" href="#term-IDE" title="Permalink to this term">¶</a></dt><dd><p>Integrated Development Environment is a software application that provides
comprehensive facilities to computer programmers for software development.</p>
</dd>
<dt id="term-interactive">interactive<a class="headerlink" href="#term-interactive" title="Permalink to this term">¶</a></dt><dd><p>Python has an interactive interpreter which means you can enter
statements and expressions at the interpreter prompt, immediately
execute them and see their results. Just launch <code class="docutils literal notranslate"><span class="pre">python</span></code> with no
arguments (possibly by selecting it from your computer’s main
menu). It is a very powerful way to test out new ideas or inspect
modules and packages (remember <code class="docutils literal notranslate"><span class="pre">help(x)</span></code>).</p>
</dd>
<dt id="term-interpreted">interpreted<a class="headerlink" href="#term-interpreted" title="Permalink to this term">¶</a></dt><dd><p>Python is an interpreted language, as opposed to a compiled one,
though the distinction can be blurry because of the presence of the
bytecode compiler. This means that source files can be run directly
without explicitly creating an executable which is then run.
Interpreted languages typically have a shorter development/debug cycle
than compiled ones, though their programs generally also run more
slowly. See also <a class="reference internal" href="#term-interactive"><span class="xref std std-term">interactive</span></a>.</p>
</dd>
<dt id="term-iterable">iterable<a class="headerlink" href="#term-iterable" title="Permalink to this term">¶</a></dt><dd><p>An object capable of returning its members one at a
time. Examples of iterables include all sequence types (such as
<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>, and <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a>) and some non-sequence
types like <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a> and <code class="xref py py-class docutils literal notranslate"><span class="pre">file</span></code> and objects of any classes you
define with an <code class="xref py py-meth docutils literal notranslate"><span class="pre">__iter__()</span></code> or <code class="xref py py-meth docutils literal notranslate"><span class="pre">__getitem__()</span></code> method. Iterables
can be used in a <a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#for" title="(in Python v3.9)"><code class="xref std std-keyword docutils literal notranslate"><span class="pre">for</span></code></a> loop and in many other places where a
sequence is needed (<a class="reference external" href="https://docs.python.org/3/library/functions.html#zip" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">zip()</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/functions.html#map" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">map()</span></code></a>, …). When an iterable
object is passed as an argument to the built-in function <a class="reference external" href="https://docs.python.org/3/library/functions.html#iter" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">iter()</span></code></a>, it
returns an iterator for the object. This iterator is good for one pass
over the set of values. When using iterables, it is usually not necessary
to call <a class="reference external" href="https://docs.python.org/3/library/functions.html#iter" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">iter()</span></code></a> or deal with iterator objects yourself. The <code class="docutils literal notranslate"><span class="pre">for</span></code>
statement does that automatically for you, creating a temporary unnamed
variable to hold the iterator for the duration of the loop. See also
<a class="reference internal" href="#term-iterator"><span class="xref std std-term">iterator</span></a>, <a class="reference internal" href="#term-sequence"><span class="xref std std-term">sequence</span></a>, and <a class="reference internal" href="#term-generator"><span class="xref std std-term">generator</span></a>.</p>
</dd>
<dt id="term-iterator">iterator<a class="headerlink" href="#term-iterator" title="Permalink to this term">¶</a></dt><dd><p>An object representing a stream of data. Repeated calls to the iterator’s
<code class="xref py py-meth docutils literal notranslate"><span class="pre">next()</span></code> method return successive items in the stream. When no more
data are available a <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#StopIteration" title="(in Python v3.9)"><code class="xref py py-exc docutils literal notranslate"><span class="pre">StopIteration</span></code></a> exception is raised instead. At
this point, the iterator object is exhausted and any further calls to its
<code class="xref py py-meth docutils literal notranslate"><span class="pre">next()</span></code> method just raise <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#StopIteration" title="(in Python v3.9)"><code class="xref py py-exc docutils literal notranslate"><span class="pre">StopIteration</span></code></a> again. Iterators are
required to have an <code class="xref py py-meth docutils literal notranslate"><span class="pre">__iter__()</span></code> method that returns the iterator
object itself so every iterator is also iterable and may be used in most
places where other iterables are accepted. One notable exception is code
which attempts multiple iteration passes. A container object (such as a
<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a>) produces a fresh new iterator each time you pass it to the
<a class="reference external" href="https://docs.python.org/3/library/functions.html#iter" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">iter()</span></code></a> function or use it in a <a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#for" title="(in Python v3.9)"><code class="xref std std-keyword docutils literal notranslate"><span class="pre">for</span></code></a> loop. Attempting this
with an iterator will just return the same exhausted iterator object used
in the previous iteration pass, making it appear like an empty container.</p>
<p>More information can be found in <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#typeiter" title="(in Python v3.9)"><span>Iterator Types</span></a>.</p>
</dd>
<dt id="term-key-function">key function<a class="headerlink" href="#term-key-function" title="Permalink to this term">¶</a></dt><dd><p>A key function or collation function is a callable that returns a value
used for sorting or ordering. For example, <a class="reference external" href="https://docs.python.org/3/library/locale.html#locale.strxfrm" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">locale.strxfrm()</span></code></a> is
used to produce a sort key that is aware of locale specific sort
conventions.</p>
<p>A number of tools in Python accept key functions to control how elements
are ordered or grouped. They include <a class="reference external" href="https://docs.python.org/3/library/functions.html#min" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">min()</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/functions.html#max" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">max()</span></code></a>,
<a class="reference external" href="https://docs.python.org/3/library/functions.html#sorted" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">sorted()</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list.sort" title="(in Python v3.9)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">list.sort()</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/heapq.html#heapq.nsmallest" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">heapq.nsmallest()</span></code></a>,
<a class="reference external" href="https://docs.python.org/3/library/heapq.html#heapq.nlargest" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">heapq.nlargest()</span></code></a>, and <a class="reference external" href="https://docs.python.org/3/library/itertools.html#itertools.groupby" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">itertools.groupby()</span></code></a>.</p>
<p>There are several ways to create a key function. For example. the
<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str.lower" title="(in Python v3.9)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">str.lower()</span></code></a> method can serve as a key function for case insensitive
sorts. Alternatively, an ad-hoc key function can be built from a
<a class="reference external" href="https://docs.python.org/3/reference/expressions.html#lambda" title="(in Python v3.9)"><code class="xref std std-keyword docutils literal notranslate"><span class="pre">lambda</span></code></a> expression such as <code class="docutils literal notranslate"><span class="pre">lambda</span> <span class="pre">r:</span> <span class="pre">(r[0],</span> <span class="pre">r[2])</span></code>. Also,
the <a class="reference external" href="https://docs.python.org/3/library/operator.html#module-operator" title="(in Python v3.9)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">operator</span></code></a> module provides three key function constructors:
<a class="reference external" href="https://docs.python.org/3/library/operator.html#operator.attrgetter" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">attrgetter()</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/operator.html#operator.itemgetter" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">itemgetter()</span></code></a>, and
<a class="reference external" href="https://docs.python.org/3/library/operator.html#operator.methodcaller" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">methodcaller()</span></code></a>. See the <a class="reference external" href="https://docs.python.org/3/howto/sorting.html#sortinghowto" title="(in Python v3.9)"><span class="xref std std-ref">Sorting HOW TO</span></a> for examples of how to create and use key functions.</p>
</dd>
<dt id="term-keyword-argument">keyword argument<a class="headerlink" href="#term-keyword-argument" title="Permalink to this term">¶</a></dt><dd><p>Arguments which are preceded with a <code class="docutils literal notranslate"><span class="pre">variable_name=</span></code> in the call.
The variable name designates the local name in the function to which the
value is assigned. <code class="docutils literal notranslate"><span class="pre">**</span></code> is used to accept or pass a dictionary of
keyword arguments. See <a class="reference internal" href="#term-argument"><span class="xref std std-term">argument</span></a>.</p>
</dd>
<dt id="term-lambda">lambda<a class="headerlink" href="#term-lambda" title="Permalink to this term">¶</a></dt><dd><p>An anonymous inline function consisting of a single <a class="reference internal" href="#term-expression"><span class="xref std std-term">expression</span></a>
which is evaluated when the function is called. The syntax to create
a lambda function is <code class="docutils literal notranslate"><span class="pre">lambda</span> <span class="pre">[arguments]:</span> <span class="pre">expression</span></code></p>
</dd>
<dt id="term-list">list<a class="headerlink" href="#term-list" title="Permalink to this term">¶</a></dt><dd><p>A built-in Python <a class="reference internal" href="#term-sequence"><span class="xref std std-term">sequence</span></a>. Despite its name it is more akin
to an array in other languages than to a linked list since access to
elements are O(1).</p>
</dd>
<dt id="term-list-comprehension">list comprehension<a class="headerlink" href="#term-list-comprehension" title="Permalink to this term">¶</a></dt><dd><p>A compact way to process all or part of the elements in a sequence and
return a list with the results. <code class="docutils literal notranslate"><span class="pre">result</span> <span class="pre">=</span> <span class="pre">["0x%02x"</span> <span class="pre">%</span> <span class="pre">x</span> <span class="pre">for</span> <span class="pre">x</span> <span class="pre">in</span>
<span class="pre">range(256)</span> <span class="pre">if</span> <span class="pre">x</span> <span class="pre">%</span> <span class="pre">2</span> <span class="pre">==</span> <span class="pre">0]</span></code> generates a list of strings containing
even hex numbers (0x..) in the range from 0 to 255. The <a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#if" title="(in Python v3.9)"><code class="xref std std-keyword docutils literal notranslate"><span class="pre">if</span></code></a>
clause is optional. If omitted, all elements in <code class="docutils literal notranslate"><span class="pre">range(256)</span></code> are
processed.</p>
</dd>
<dt id="term-MCA">MCA<a class="headerlink" href="#term-MCA" title="Permalink to this term">¶</a></dt><dd><p>Multichannel Analyzer (MCA) is a device for …</p>
</dd>
<dt id="term-method">method<a class="headerlink" href="#term-method" title="Permalink to this term">¶</a></dt><dd><p>A function which is defined inside a class body. If called as an attribute
of an instance of that class, the method will get the instance object as
its first <a class="reference internal" href="#term-argument"><span class="xref std std-term">argument</span></a> (which is usually called <code class="docutils literal notranslate"><span class="pre">self</span></code>).
See <a class="reference internal" href="#term-function"><span class="xref std std-term">function</span></a> and <a class="reference internal" href="#term-nested-scope"><span class="xref std std-term">nested scope</span></a>.</p>
</dd>
<dt id="term-namespace">namespace<a class="headerlink" href="#term-namespace" title="Permalink to this term">¶</a></dt><dd><p>The place where a variable is stored. Namespaces are implemented as
dictionaries. There are the local, global and built-in namespaces as well
as nested namespaces in objects (in methods). Namespaces support
modularity by preventing naming conflicts. For instance, the functions
<code class="xref py py-func docutils literal notranslate"><span class="pre">__builtin__.open()</span></code> and <a class="reference external" href="https://docs.python.org/3/library/os.html#os.open" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">os.open()</span></code></a> are distinguished by their
namespaces. Namespaces also aid readability and maintainability by making
it clear which module implements a function. For instance, writing
<a class="reference external" href="https://docs.python.org/3/library/random.html#random.seed" title="(in Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">random.seed()</span></code></a> or <code class="xref py py-func docutils literal notranslate"><span class="pre">itertools.izip()</span></code> makes it clear that those
functions are implemented by the <a class="reference external" href="https://docs.python.org/3/library/random.html#module-random" title="(in Python v3.9)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">random</span></code></a> and <a class="reference external" href="https://docs.python.org/3/library/itertools.html#module-itertools" title="(in Python v3.9)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">itertools</span></code></a>
modules, respectively.</p>
</dd>
<dt id="term-nested-scope">nested scope<a class="headerlink" href="#term-nested-scope" title="Permalink to this term">¶</a></dt><dd><p>The ability to refer to a variable in an enclosing definition. For
instance, a function defined inside another function can refer to
variables in the outer function. Note that nested scopes work only for
reference and not for assignment which will always write to the innermost
scope. In contrast, local variables both read and write in the innermost
scope. Likewise, global variables read and write to the global namespace.</p>
</dd>
<dt id="term-new-style-class">new-style class<a class="headerlink" href="#term-new-style-class" title="Permalink to this term">¶</a></dt><dd><p>Any class which inherits from <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a>. This includes all built-in
types like <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a> and <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a>. Only new-style classes can
use Python’s newer, versatile features like <code class="xref py py-attr docutils literal notranslate"><span class="pre">__slots__</span></code>,
descriptors, properties, and <code class="xref py py-meth docutils literal notranslate"><span class="pre">__getattribute__()</span></code>.</p>
</dd>
<dt id="term-object">object<a class="headerlink" href="#term-object" title="Permalink to this term">¶</a></dt><dd><p>Any data with state (attributes or value) and defined behavior
(methods). Also the ultimate base class of any <a class="reference internal" href="#term-new-style-class"><span class="xref std std-term">new-style
class</span></a>.</p>
</dd>
<dt id="term-OS">OS<a class="headerlink" href="#term-OS" title="Permalink to this term">¶</a></dt><dd><p>An operating system (OS) is software, consisting of programs and data,
that runs on computers, manages computer hardware resources, and
provides common services for execution of various application software.
Operating system is the most important type of system software in a
computer system. Without an operating system, a user cannot run an
application program on their computer, unless the application program
is self booting.</p>
</dd>
<dt id="term-PLC">PLC<a class="headerlink" href="#term-PLC" title="Permalink to this term">¶</a></dt><dd><p>A programmable logic controller (PLC) is an industrial digital computer
which has been ruggedised and adapted for the control of manufacturing
processes, such as assembly lines, or robotic devices, or any activity
that requires high reliability control e.g. equipment or personal
protection.</p>
</dd>
<dt id="term-plug-in">plug-in<a class="headerlink" href="#term-plug-in" title="Permalink to this term">¶</a></dt><dd><p>a plug-in (or plugin) is a set of software components that adds
specific abilities to a larger software application. If supported,
plug-ins enable customizing the functionality of an application. For
example, plug-ins are commonly used in web browsers to play video,
scan for viruses, and display new file types.</p>
</dd>
<dt id="term-plugin">plugin<a class="headerlink" href="#term-plugin" title="Permalink to this term">¶</a></dt><dd><p>See <a class="reference internal" href="#term-plug-in"><span class="xref std std-term">plug-in</span></a>.</p>
</dd>
<dt id="term-positional-argument">positional argument<a class="headerlink" href="#term-positional-argument" title="Permalink to this term">¶</a></dt><dd><p>The arguments assigned to local names inside a function or method,
determined by the order in which they were given in the call. <code class="docutils literal notranslate"><span class="pre">*</span></code> is
used to either accept multiple positional arguments (when in the
definition), or pass several arguments as a list to a function. See
<a class="reference internal" href="#term-argument"><span class="xref std std-term">argument</span></a>.</p>
</dd>
<dt id="term-Python-3000">Python 3000<a class="headerlink" href="#term-Python-3000" title="Permalink to this term">¶</a></dt><dd><p>Nickname for the Python 3.x release line (coined long ago when the release
of version 3 was something in the distant future.) This is also
abbreviated “Py3k”.</p>
</dd>
<dt id="term-Pythonic">Pythonic<a class="headerlink" href="#term-Pythonic" title="Permalink to this term">¶</a></dt><dd><p>An idea or piece of code which closely follows the most common idioms
of the Python language, rather than implementing code using concepts
common to other languages. For example, a common idiom in Python is
to loop over all elements of an iterable using a <a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#for" title="(in Python v3.9)"><code class="xref std std-keyword docutils literal notranslate"><span class="pre">for</span></code></a>
statement. Many other languages don’t have this type of construct, so
people unfamiliar with Python sometimes use a numerical counter instead:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">food</span><span class="p">)):</span>
<span class="nb">print</span><span class="p">(</span><span class="n">food</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
</pre></div>
</div>
<p>As opposed to the cleaner, Pythonic method:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">piece</span> <span class="ow">in</span> <span class="n">food</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="n">piece</span><span class="p">)</span>
</pre></div>
</div>
</dd>
<dt id="term-RoI">RoI<a class="headerlink" href="#term-RoI" title="Permalink to this term">¶</a></dt><dd><p><em>Region of Interest</em> are samples within a data set identified for a
particular purpose.</p>
</dd>
<dt id="term-SCADA">SCADA<a class="headerlink" href="#term-SCADA" title="Permalink to this term">¶</a></dt><dd><p>supervisory control and data acquisition (SCADA) generally refers to
industrial control systems: computer systems that monitor and control
industrial, infrastructure, or facility-based processes.</p>
</dd>
<dt id="term-SDS">SDS<a class="headerlink" href="#term-SDS" title="Permalink to this term">¶</a></dt><dd><p>Sardana Device server (SDS) is the sardana tango device server
<a class="reference internal" href="#term-daemon"><span class="xref std std-term">daemon</span></a>.</p>
</dd>
<dt id="term-sequence">sequence<a class="headerlink" href="#term-sequence" title="Permalink to this term">¶</a></dt><dd><p>An <a class="reference internal" href="#term-iterable"><span class="xref std std-term">iterable</span></a> which supports efficient element access using integer
indices via the <code class="xref py py-meth docutils literal notranslate"><span class="pre">__getitem__()</span></code> special method and defines a
<code class="xref py py-meth docutils literal notranslate"><span class="pre">len()</span></code> method that returns the length of the sequence.
Some built-in sequence types are <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>,
<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a>, and <code class="xref py py-class docutils literal notranslate"><span class="pre">unicode</span></code>. Note that <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a> also
supports <code class="xref py py-meth docutils literal notranslate"><span class="pre">__getitem__()</span></code> and <code class="xref py py-meth docutils literal notranslate"><span class="pre">__len__()</span></code>, but is considered a
mapping rather than a sequence because the lookups use arbitrary
<a class="reference external" href="https://docs.python.org/3/glossary.html#term-immutable" title="(in Python v3.9)"><span class="xref std std-term">immutable</span></a> keys rather than integers.</p>
</dd>
<dt id="term-singleton-pattern">singleton pattern<a class="headerlink" href="#term-singleton-pattern" title="Permalink to this term">¶</a></dt><dd><p>Singleton pattern is a software design pattern that restricts the
instantiation of a class to one “single” instance. This is useful when
exactly one object is needed to coordinate actions across the system.</p>
</dd>
<dt id="term-slice">slice<a class="headerlink" href="#term-slice" title="Permalink to this term">¶</a></dt><dd><p>An object usually containing a portion of a <a class="reference internal" href="#term-sequence"><span class="xref std std-term">sequence</span></a>. A slice is
created using the subscript notation, <code class="docutils literal notranslate"><span class="pre">[]</span></code> with colons between numbers
when several are given, such as in <code class="docutils literal notranslate"><span class="pre">variable_name[1:3:5]</span></code>. The bracket
(subscript) notation uses <a class="reference external" href="https://docs.python.org/3/library/functions.html#slice" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">slice</span></code></a> objects internally (or in older
versions, <code class="xref py py-meth docutils literal notranslate"><span class="pre">__getslice__()</span></code> and <code class="xref py py-meth docutils literal notranslate"><span class="pre">__setslice__()</span></code>).</p>
</dd>
<dt id="term-statement">statement<a class="headerlink" href="#term-statement" title="Permalink to this term">¶</a></dt><dd><p>A statement is part of a suite (a “block” of code). A statement is either
an <a class="reference internal" href="#term-expression"><span class="xref std std-term">expression</span></a> or a one of several constructs with a keyword, such
as <a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#if" title="(in Python v3.9)"><code class="xref std std-keyword docutils literal notranslate"><span class="pre">if</span></code></a>, <a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#while" title="(in Python v3.9)"><code class="xref std std-keyword docutils literal notranslate"><span class="pre">while</span></code></a> or <a class="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#for" title="(in Python v3.9)"><code class="xref std std-keyword docutils literal notranslate"><span class="pre">for</span></code></a>.</p>
</dd>
<dt id="term-stepper">stepper<a class="headerlink" href="#term-stepper" title="Permalink to this term">¶</a></dt><dd><p>A stepper motor (or step motor) is a brushless DC electric motor that
divides a full rotation into a number of equal steps. The motor’s
position can then be commanded to move and hold at one of these steps
without any feedback sensor (an open-loop controller), as long as the
motor is carefully sized to the application.</p>
</dd>
<dt id="term-triple-quoted-string">triple-quoted string<a class="headerlink" href="#term-triple-quoted-string" title="Permalink to this term">¶</a></dt><dd><p>A string which is bound by three instances of either a quotation mark
(“) or an apostrophe (‘). While they don’t provide any functionality
not available with single-quoted strings, they are useful for a number
of reasons. They allow you to include unescaped single and double
quotes within a string and they can span multiple lines without the
use of the continuation character, making them especially useful when
writing docstrings.</p>
</dd>
<dt id="term-type">type<a class="headerlink" href="#term-type" title="Permalink to this term">¶</a></dt><dd><p>The type of a Python object determines what kind of object it is; every
object has a type. An object’s type is accessible as its
<code class="xref py py-attr docutils literal notranslate"><span class="pre">__class__</span></code> attribute or can be retrieved with <code class="docutils literal notranslate"><span class="pre">type(obj)</span></code>.</p>
</dd>
<dt id="term-user">user<a class="headerlink" href="#term-user" title="Permalink to this term">¶</a></dt><dd><p>See <a class="reference internal" href="#term-user-position"><span class="xref std std-term">user position</span></a></p>
</dd>
<dt id="term-user-position">user position<a class="headerlink" href="#term-user-position" title="Permalink to this term">¶</a></dt><dd><p>Moveable position in user units (See also <a class="reference internal" href="#term-dial-position"><span class="xref std std-term">dial position</span></a>).
Dial and user units are related by the following expressions:</p>
<blockquote>
<div><p>user = sign x dial + offset
dial = controller_position / steps_per_unit</p>
</div></blockquote>
<p>where <em>sign</em> is -1 or 1. <em>offset</em> can be any number and <em>steps_per_unit</em>
must be non zero.</p>
</dd>
</dl>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="other_versions.html" class="btn btn-neutral float-right" title="Docs for other Sardana versions" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="news.html" class="btn btn-neutral float-left" title="What’s new?" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright Except where otherwise noted, content on this site is
licensed under a Creative Commons Attribution 3.0 License.
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>