[2ceedb]: / 3DNet / util / file_process.py

Download this file

19 lines (14 with data), 322 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python
# coding: utf-8
import os
import os.path as osp
def load_lines(file_path):
"""Read file into a list of lines.
Input
file_path: file path
Output
lines: an array of lines
"""
with open(file_path, 'r') as fio:
lines = fio.read().splitlines()
return lines