Michele De Stefano's C++ Utilities
sequence_iterator_example.pycmd
1 // sequence_iterator_example.pycmd
2 //
3 // Copyright (c) 2012 - Michele De Stefano (micdestefano@users.sourceforge.net)
4 //
5 // Distributed under the MIT License (See accompanying file LICENSE)
6 
7 
8 /**
9  * \example sequence_iterator_example.pycmd
10  *
11  * Shows the usage of the sequence_iterator_example extension from the
12  * Python prompt.
13  */
14 
15 mds_utils::python::PySequenceIterator usage example from the Python
16 prompt:
17 
18 >>> import sequence_iterator_test as test
19 >>> l = [1.1,2.2,3.3,4.4]
20 >>> test.print_seq_d(l)
21 1.1,2.2,3.3,4.4,
22 >>> test.incr_seq_d(l)
23 >>> l
24 [2.1, 3.2, 4.3, 5.4]
25 >>> l = [1.1+2.2j,3.3+4.4j,5.5+6.6j]
26 >>> test.print_seq_cplx(l)
27 (1.1,2.2),(3.3,4.4),(5.5,6.6),
28 >>> test.incr_seq_cplx(l)
29 >>> l
30 [(2.1+2.2j), (4.3+4.4j), (6.5+6.6j)]