-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileRead.py
More file actions
42 lines (34 loc) · 798 Bytes
/
Copy pathFileRead.py
File metadata and controls
42 lines (34 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from datetime import time
__author__ = 'aliunsal'
from collections import Counter
import time
import fileinput
position = 0
last = ""
# while last != "\n":
# last = file.readline()
# print last
# position += len(file.readline())
# file.seek(position)
#
# def file_read(file):
# for line in file:
# l = line.split(" ")
# yield l[6]
file = fileinput.input("test.log")
for line in open("test.log", "r"):
print line
# link = []
#
# with open("test.log", "r") as file:
# start = time.time()
# for f in file:
# s = f.split(" ")
# try:
# link.append(s[6])
# except:
# print("")
# end = time.time() - start
# print end
#
# print "%s %d adet istek yapilmistir" % Counter(link).most_common(1)[0]