-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
23 lines (17 loc) · 646 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import configparser
from os.path import isdir
config_dict = configparser.ConfigParser()
config_dict.read("config.ini", encoding="UTF-8")
# CONSTANTS
CHUNK_SIZE = int(config_dict["CONSTANTS"]["CHUNK_SIZE"])
UNIT_SIZE = int(config_dict["CONSTANTS"]["UNIT_SIZE"])
# PACKET CHARACTERISTICS
PRR = int(config_dict["CONSTANTS"]["PRR"])
DX = float(config_dict["CONSTANTS"]["DX"])
# PATHs to files and save
INPUT_PATH = config_dict["PATH"]["INPUT_PATH"]
if not isdir(INPUT_PATH):
raise Exception("PATH is not accessible!")
OUTPUT_PATH = config_dict["PATH"]["OUTPUT_PATH"]
if not isdir(OUTPUT_PATH):
raise Exception("PATH is not accessible!")