PyCharm 是否具有自动完成文件路径? [英] Does PyCharm have autocomplete file path?
问题描述
在 Python 附带的 IDLE 中,如果我要输入:
In the IDLE that comes with Python if I were to type :
a='c:\
显示包含目录文件内容的列表以供建议.使用 Pycharm 如果我输入:
A list with the file contents of the directory is displayed for suggestion. With Pycharm if I enter :
a='c:\
不显示目录内的内容列表.如果我按control + space",PyCharm 的自动完成建议是我代码中的函数和变量列表.PyCharm 是否能够在代码中自动完成文件路径建议?
No list of the contents inside the directory is displayed. If I press 'control + space', PyCharm's auto-complete suggestions are a list of functions and variables inside my code. Does PyCharm have the capabilities to auto-complete file path suggestions within code?
推荐答案
是的,但您需要注入语言才能这样做.让我演示一下:
Yes it does, but you need to inject language in order to do so. Let me demonstrate:
我不得不使用视频,因为我认为这是解释其工作原理的最清晰方式.
I had to use video, since I think that’s the clearest way to explain how this works.
这篇关于PyCharm 是否具有自动完成文件路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!