I tried multiple times to make this work without results, here's the code
import os, sys
try:
with open("syscore.lib", "r") as confFile:
readConfFile = confFile.readlines()
fileExist = True
except:
fileExist = False
if fileExist is True:
method = "r"
else:
method = "w"
for _ in range(2):
with open("syscore.lib", method) as confFile:
try:
readConfFile = confFile.readlines()
except:
confFile.write(os.system("python --version").replace("Python ", ""))
print(readConfFile)
The problem come again in a similar way down here
import os
test = [str(os.system('python --version'))]
test1 = os.system('python --version')
print('PV: '+str(test1))
print('Python Version: '+test[0])
Can anyone help me with this? Thanks