Код: Выделить всё
import os
if os.path.exists("demofile.txt"):
print("file exists")
else:
print("file does not exist")
Если я использую эту систему сборки Python3:
Код: Выделить всё
{
"shell_cmd": "python3 -OO -u \"$file\"",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python.3",
"windows":
{
"shell_cmd": "py -3 -OO -u \"$file\""
}
}
Код: Выделить всё
file exists
[Finished in 0.0s]
Код: Выделить всё
{
"target": "terminus_exec",
"cancel": "terminus_cancel_build",
"focus": true,
"shell_cmd": "python3 -OO -u \"$file\"",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python.3",
"windows":
{
"shell_cmd": "py -3 -OO -u \"$file\""
}
}
Код: Выделить всё
file does not exist
[Finished in 0.08s]
Есть мысли о том, что может здесь происходит?
Спасибо
Подробнее здесь: https://stackoverflow.com/questions/665 ... e-handling
Мобильная версия