1 # Copyright (C) 2010-2012 W. Trevor King <wking@tremily.us>
3 # This file is part of Hooke.
5 # Hooke is free software: you can redistribute it and/or modify it under the
6 # terms of the GNU Lesser General Public License as published by the Free
7 # Software Foundation, either version 3 of the License, or (at your option) any
10 # Hooke is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with Hooke. If not, see <http://www.gnu.org/licenses/>.
19 >>> from hooke.hooke import Hooke, HookeRunner
23 >>> h = r.run_lines(h, ['new_playlist --output_playlist mylist'])
27 >>> h = r.run_lines(h, ['glob_curves_to_playlist test/data/vclamp_picoforce/*']
28 ... ) # doctest: +ELLIPSIS
31 <Curve 20071120a_i27_t33.100>
32 <Curve 20071120a_i27_t33.101>
34 <Curve 20071120a_i27_t33.199>
37 >>> h = r.run_lines(h, ['jump_to_curve 14'])
40 >>> h = r.run_lines(h, ['''set_note "Hi there.\\nI'm a note"'''])
43 >>> h = r.run_lines(h, ['jump_to_curve 27'])
46 >>> h = r.run_lines(h, ['''set_note "I'm another note."'''])
49 >>> h = r.run_lines(h, ['note_filter_playlist --output_playlist filtered'])
50 <FilePlaylist filtered>
53 >>> h = r.run_lines(h, ['get_playlist'])
57 >>> h = r.run_lines(h, ['jump_to_playlist -- -1'])
60 >>> h = r.run_lines(h, ['get_playlist'])
61 <FilePlaylist filtered>
64 >>> h = r.run_lines(h, ['get_curve'])
65 <Curve 20071120a_i27_t33.112>
68 >>> h = r.run_lines(h, ['curve_index'])
72 >>> h = r.run_lines(h, ['jump_to_curve -- -1'])
75 >>> h = r.run_lines(h, ['get_curve'])
76 <Curve 20071120a_i27_t33.125>
79 >>> h = r.run_lines(h, ['curve_index'])
83 >>> h = r.run_lines(h, ['get_note'])
87 >>> h = r.run_lines(h, ['set_note ""'])
90 >>> h = r.run_lines(h, ['get_note'])