简体   繁体   English

VS 代码终端自动完成功能不适用于 python 交互式 shell

[英]VS Code Terminal Autocompletion does not working with python interactive shell

I am using VS code Latest Version(1.47.2) in Windows 7, and using two internal terminals.我在 Windows 7 中使用 VS 代码最新版本(1.47.2),并使用两个内部终端。 One is basic CMD and the other is python interactive shell.一个是基本的 CMD,另一个是 python 交互式 shell。 Auto completion isn't working in either terminal.自动完成在任一终端都不起作用。

Also it does not suggest what am I writing like in workspace with Python or CSS file, which gives suggestion when I am typing a code.它也不建议我在工作区中使用 Python 或 CSS 文件写什么,当我输入代码时会给出建议。
I also installed python and code runner in vs Code.我还在 vs Code 中安装了 python 和代码运行器。

So what is the problem and what are the possible solutions?那么问题是什么以及可能的解决方案是什么?

Because I am new to programming I want to learn Python.因为我是编程新手,所以我想学习 Python。
So please help me with terminal auto completion because I am watching tutorials in which the instructor presses only TAB for automatic insertion, but when I press TAB in terminal, the cursor goes in about 6 spaces like in a normal text editor.因此,请帮助我完成终端自动完成,因为我正在观看教程,其中讲师仅按 TAB 进行自动插入,但是当我在终端中按 TAB 时,cursor 像在普通文本编辑器中一样进入大约 6 个空格。

The instructor is probably using ipython, the default python terminal doesn't include auto completion.讲师可能正在使用 ipython,默认的 python 终端不包括自动完成功能。

This problem isn't connected to the fact you are using VScode.此问题与您使用 VScode 的事实无关。 when you open a terminal of CMD/bash/python in VScode it just starts a process within itself.当您在 VScode 中打开 CMD/bash/python 的终端时,它只会在其内部启动一个进程。
VScode only help with auto completion in the editor panel. VScode 仅有助于在编辑器面板中自动完成。

Maybe this will help you: How do I add tab completion to the Python shell?也许这会对您有所帮助: 如何将制表符补全添加到 Python shell?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM