[英]Opening .py files in PyCharm Editor
Currently, I have PyCharm recognizing the .py extension and all .py files have the PyCharm icon.目前,我让 PyCharm 识别 .py 扩展名,并且所有 .py 文件都有 PyCharm 图标。 However, when I double click on a .py file, the project opens up (if it's in a project) and on the left hand side I can see everything in my project folder, but the center of PyCharm is telling me "No files are open."
但是,当我双击一个 .py 文件时,该项目会打开(如果它在一个项目中)并且在左侧我可以看到我的项目文件夹中的所有内容,但是 PyCharm 的中心告诉我“没有文件是打开。” I can open, write, and run scratch files though.
不过,我可以打开、写入和运行暂存文件。
How do I get the python script in the editor?如何在编辑器中获取 python 脚本?
if you press ALT-1 you will see on the left, files of your current open project.如果按 ALT-1,您将在左侧看到当前打开项目的文件。 If you click on file with .py and it does not open in the Editor window, it may mean your default layout got somehow changed.
如果您单击带有 .py 的文件并且它没有在编辑器窗口中打开,则可能意味着您的默认布局以某种方式发生了变化。 Press Shift-F12 to restore to default layout, and click on a .py file again.
按 Shift-F12 恢复默认布局,然后再次单击 .py 文件。 Other thing to try is to delete .idea folder in the project directory and restart Pycharm.
另一个尝试是删除项目目录中的 .idea 文件夹并重新启动 Pycharm。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.