简体   繁体   English

在使用 Python 的 Visual Studio Code 中,有没有办法无需先键入字母即可查看模块的内容?

[英]In Visual Studio Code using Python, Is there a way to see the contents of a module without first having to type a letter?

I'm in Visual Studio Code using Python.我在 Visual Studio Code 中使用 Python。 When importing a module I would like to see the classes it contains so as to make sure it has what I'm looking for.导入模块时,我想查看它包含的类,以确保它具有我正在寻找的内容。 Is there a way to see the contents of a module without first having to type a letter?有没有一种无需先输入字母即可查看模块内容的方法? In IDLE sometims it is possible to do this.在 IDLE 中,有时可以这样做。

For example, in VSC, at the start of a script:例如,在 VSC 中,在脚本的开头:

from random import #At this point a list should somehow appear

Thanks谢谢

After you typed "from random import " hit Ctrl+Space to bring up autocomplete menu, it is a default shortcut but if you wish to change it you can, just search for Trigger Suggest in Keyboard Shortcuts输入"from random import "Ctrl+Space以调出自动完成菜单,这是默认快捷方式,但如果您想更改它,只需在键盘快捷方式中搜索Trigger Suggest

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

相关问题 ModuleNotFoundError:使用 Visual Studio Code 在 Python 中没有名为“PySide6”的模块 - ModuleNotFoundError: No module named 'PySide6' in Python using Visual Studio Code Python 未找到 Visual Studio 代码模块 - Python Visual Studio Code Module not found 如何在 Visual Studio Code 中重新运行 Python justpy 应用程序而无需停止进程? - How to rerun Python justpy apps in Visual Studio Code without having to stop the process? 将 python 路径添加到 Visual Studio 代码中的模块 - add a python path to a module in visual studio code 在 python 中遇到 sqrt() 问题,我正在使用 Visual Studio Code 软件进行 python 练习 - having sqrt() problem in python, I am using Visual Studio Code software to do the python practice 没有 PowerShell 的 Visual Studio 代码中的 Python - Python in Visual Studio Code without PowerShell 如何为 Visual Studio Code (Python) 键入响应? - How to type responses for Visual Studio Code (Python)? Visual Studio 代码 Python 文件类型 - Visual Studio Code Python File Type 如何提取csv文件的内容并将它们放在dict文件类型中而不使用csv模块。 [蟒蛇] - How to extract contents of a csv file and place them in a dict file type without using csv module. [python] Visual Studio代码仅在unittest模块中运行第一个测试功能 - Visual studio code only runs first test function in unittest module
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM