Practical method VScode software, Linux systems use a script to perform the python

linux system using VScode software to compile the script execution and practical method
recently when using a server, linux system is python3 build environment, you can use VScode easy to manage multiple software code files, test files and can write, but in debug time VScode software does not debug, then need to download the module, but there is no network in which the server, change the server has other network, but there is no module complete python3 need.

Vscode terminal can only be used in the implementation of python3 + script file name to carry out the print information on the screen, debug

python3 文件名

But this looked too much trouble, a small window, so they write a simple script file run_py
reads as follows:

python3 文件名 > python.log

NOTE:> This indicated that it would overwrite the file each time you execute

The resulting executable file written python.log file
Here Insert Picture Description
using the source run_py which can execute test script file

Complete results are as follows:
Here Insert Picture Description
After done and the left side of the window you can manage the entire code files, you can watch the right code and debug the results, information can execute code at the bottom of the window, each execution, log file is automatically refreshed.

Published 105 original articles · won praise 71 · views 40000 +

Guess you like

Origin blog.csdn.net/vivid117/article/details/104845441