Environment: Windows 10 x64 VSCode Version 1.23.1 python 3.6.4
I've been trying to switch from sublime text 3 to VS code. I have python 3.6.4 installed in my computer, all set with the PATH and other stuff.
In my sublime text 3, I set the build for python 3 (*.sublime-build) as:
{
"shell_cmd": "python --version && echo. && python -u \"$file\"",
"cmd": ["C:/Users/jxie0/AppData/Local/Programs/Python/Python36/python.exe", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9])*",
"selector": "source.python"
}
this will add a python version output with a blank line, before running the python code, take print('hello world')
as an example:
Python 3.6.4
hello world
[Finished in 0.1s]
And sublime automatic add a timer for the code at the end.
In my current task.json for VS code, I have:
{
"version": "0.1.0",
"command": "python",
"isShellCommand": true,
"args": ["${file}"],
"showOutput": "always"
}
This will work, but just simply show the output of the python codes:
hello world
Is there anyway I can tune it into something that can give me same kind of output style as I got from sublime text? If the timer is not possible, at least can I add a shell command as a header to show the python 3 version?
Additional question: what does that "version": "0.1.0",
do in VS code? Which version does it refer to?
Thanks!