Load yaml with pyscripter/python4delphi
Budget: $10 – $30 USD
This code not working pyscripter/python4delphi:
def readConfig():
with open("./config/config.yaml", 'r') as s:
stream = s.read()
return yaml.safe_load(stream)
try:
streamConfig = readConfig()
configThreshold = streamConfig['threshold']
configTimeIntervals = streamConfig['time_intervals']
metamaskData = streamConfig['metamask']
chestData = streamConfig['value_chests']
offsets = streamConfig['offsets']
except FileNotFoundError:
print('Error: config.yaml file not found, rename EXAMPLE-config.yaml to config.yaml inside /config folder')
print('Erro: Arquivo config.yaml não encontrado, renomear EXAMPLE-config.yaml para config.yaml dentro da pasta /config')
exit()
def readConfig():
with open("./config/config.yaml", 'r') as s:
stream = s.read()
return yaml.safe_load(stream)
try:
streamConfig = readConfig()
configThreshold = streamConfig['threshold']
configTimeIntervals = streamConfig['time_intervals']
metamaskData = streamConfig['metamask']
chestData = streamConfig['value_chests']
offsets = streamConfig['offsets']
except FileNotFoundError:
print('Error: config.yaml file not found, rename EXAMPLE-config.yaml to config.yaml inside /config folder')
print('Erro: Arquivo config.yaml não encontrado, renomear EXAMPLE-config.yaml para config.yaml dentro da pasta /config')
exit()