-# Copyright (C) 2010-2012 W. Trevor King <wking@drexel.edu>
+# Copyright (C) 2010-2012 W. Trevor King <wking@tremily.us>
#
# This file is part of Hooke.
#
-# Hooke is free software: you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
+# Hooke is free software: you can redistribute it and/or modify it under the
+# terms of the GNU Lesser General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
#
-# Hooke is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
-# Public License for more details.
+# Hooke is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Hooke. If not, see
-# <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Lesser General Public License
+# along with Hooke. If not, see <http://www.gnu.org/licenses/>.
"""
>>> import os
>>> p = h.playlists.current()
>>> for i,curve in enumerate(p.items()):
-... print (i,
+... print((i,
... curve.info['raw info']['file-format-version'],
-... [d.info['name'] for d in curve.data]) # doctest: +REPORT_UDIFF
+... [d.info['name'] for d in curve.data])) # doctest: +REPORT_UDIFF
(0, '0.5', ['approach', 'retract'])
(1, '0.5', ['approach', 'pause', 'retract'])
(2, '0.2', ['pause-0', 'approach', 'pause-1', 'retract'])
>>> base_dir = os.path.join('test', 'data', 'vclamp_jpk', 'Data1D')
>>> for file_name in sorted(os.listdir(base_dir)):
... path = os.path.join(base_dir, file_name)
-... print path
-... print driver.is_me(path)
+... print(path)
+... print(driver.is_me(path))
... data = driver.read(path)
-... print data.shape, data[:5], data[-5:]
+... print(' '.join(str(x) for x in [data.shape, data[:5], data[-5:]]))
... # doctest: +ELLIPSIS, +REPORT_UDIFF
test/data/vclamp_jpk/Data1D/data1D-ConstantData1D-1282315524304.jpk-data1D
True