]> git.phdru.name Git - m_lib.git/blob - m_lib/pbar/test/test2.py
Use print function for Py3 compatibility
[m_lib.git] / m_lib / pbar / test / test2.py
1 #! /usr/bin/env python
2 """
3    Test N2 to time file reading
4 """
5
6 from __future__ import print_function
7 import sys
8 from clock import clock
9
10
11 def test():
12    print("Test: ", end=' ')
13    sys.stdout.flush()
14
15    infile = open(sys.argv[1])
16    lines = []
17    line = '\n'
18    while line:
19       line = infile.readline()
20       lines.append(line)
21    infile.close()
22
23    print("Ok")
24
25
26 if __name__ == "__main__":
27    test()
28    print("Overall time:", clock())