Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def read_conn_file(path: str) -> None:
- try:
- with open(path) as f:
- for line in f:
- if line[0] == '#':
- # Ignore comments.
- continue
- conn_line: str = line.rstrip()
- conn_line_splited: list = conn_line.split('\t')
- timestamp = float(conn_line_splited[0])
- conn_uid = conn_line_splited[1]
- src_ip = conn_line_splited[2]
- # ETC.
- except FileNotFoundError:
- print('Error: ')
- path = 'PATH_TO_CONN_FILE'
- read_conn_file(path)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement