Convert from "print ..." to "print(...)"
[hooke.git] / test / jpk_driver.py
index f8e738d6075c7da5cb41289bab9fbe1ed1ea7002..63521a68035200ce41a85aec3511b379192bf8c9 100644 (file)
@@ -1,20 +1,19 @@
-# 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
@@ -43,9 +42,9 @@ Ensure that we can at least load each of the example curves.
 
 >>> 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'])
@@ -59,10 +58,10 @@ Load each of the example segments in the :file:`Data1D` directory.
 >>> 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