1 # Copyright (C) 2010 W. Trevor King <wking@drexel.edu>
3 # This file is part of Hooke.
5 # Hooke is free software: you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as
7 # published by the Free Software Foundation, either version 3 of the
8 # License, or (at your option) any later version.
10 # Hooke is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
13 # Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with Hooke. If not, see
17 # <http://www.gnu.org/licenses/>.
20 >>> from hooke.hooke import Hooke, HookeRunner
24 >>> h = r.run_lines(h, ['new_playlist --output_playlist mylist'])
28 >>> h = r.run_lines(h, ['glob_curves_to_playlist test/data/vclamp_picoforce/*']
29 ... ) # doctest: +ELLIPSIS
32 <Curve 20071120a_i27_t33.100>
33 <Curve 20071120a_i27_t33.101>
35 <Curve 20071120a_i27_t33.199>
38 >>> h = r.run_lines(h, ['jump_to_curve 14'])
41 >>> h = r.run_lines(h, ['''set_note "Hi there.\\nI'm a note"'''])
44 >>> h = r.run_lines(h, ['jump_to_curve 27'])
47 >>> h = r.run_lines(h, ['''set_note "I'm another note."'''])
50 >>> h = r.run_lines(h, ['note_filter_playlist --output_playlist filtered'])
51 <FilePlaylist filtered>
54 >>> h = r.run_lines(h, ['get_playlist'])
58 >>> h = r.run_lines(h, ['jump_to_playlist -- -1'])
61 >>> h = r.run_lines(h, ['get_playlist'])
62 <FilePlaylist filtered>
65 >>> h = r.run_lines(h, ['get_curve'])
66 <Curve 20071120a_i27_t33.112>
69 >>> h = r.run_lines(h, ['curve_index'])
73 >>> h = r.run_lines(h, ['jump_to_curve -- -1'])
76 >>> h = r.run_lines(h, ['get_curve'])
77 <Curve 20071120a_i27_t33.125>
80 >>> h = r.run_lines(h, ['curve_index'])
84 >>> h = r.run_lines(h, ['get_note'])
88 >>> h = r.run_lines(h, ['set_note ""'])
91 >>> h = r.run_lines(h, ['get_note'])