selfteaching / selfteaching/selfteaching-python-camp

Day03 关于vscode中右键然后选择“在终端中运行python文件”不显示结果的两个解决偏方

Open
#850 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
151
Forks
875
PR merge metrics
No merged PRs in 30d

Description

昨天在vscode中右键python文件,然后选择“在终端中运行python文件”后,命令里不再显示执行结果了...
把这个问题弄好的方法还没找到,但是有两个偏方可以解决燃眉之急:
1、右边的Extensions(快捷键Ctrl+Shift+X),搜索Code Runner,安装它,然后程序右上角会多出一个小三角形,只要点它就会自动运行python文件了并输出结果。(但缺点是无法输出中文结果,切不能在输出结果的地方进行输入,导致无法知道互动性python文件的互动过程是否正确,比如day3的设计计算器)。
2、在命令里cd到你python文件所在的文件夹,然后手动输入python+空格+文件名(比如python d5_exercise_array.py),缺点是麻烦...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in VS Code by using the context-menu option to run a Python file and check whether output appears in the terminal. Compare this with Code Runner and the manual python d5_exercise_array.py command, including Chinese output and interactive input. Done means the normal VS Code command displays output and supports interactive Python programs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.