How to get Spyder to open python scripts (.py files) directly from Windows Explorer(如何让 Spyder 直接从 Windows 资源管理器打开 python 脚本(.py 文件))
问题描述
我最近在 Windows 7 (Anaconda 3-2.4.0-Windows-x86_64) 上安装了 Anaconda 发行版.与 IDLE 不同,我无法在 Spyder IDE 中右键单击并打开 py 文件.我必须先打开 Spyder,然后导航到文件或将其拖放到编辑器中.有没有办法直接从 Widows Explorer 在编辑器中打开文件?
I have recently installed the Anaconda distribution on Windows 7 (Anaconda 3-2.4.0-Windows-x86_64). Unlike IDLE, I can't right-click and open a py file in the Spyder IDE. I will have to open Spyder first and then navigate to the file or drag and drop it in the editor. Is there any way to open the file in the editor directly from Widows Explorer?
推荐答案
使用当前版本的 Anaconda (4.1.0),您只需在 Windows 文件资源管理器中右键单击 python 脚本并选择打开方式"即可.第一次执行此操作时,您需要选择选择默认程序",然后浏览到 Anaconda 安装中脚本目录中的 spyder.exe.还要确保取消选中始终使用所选程序打开此类文件",然后单击确定".从现在开始,当您从 Windows 文件资源管理器的右键菜单中选择打开方式"时,spyder.exe 将始终列为选项之一.
With the current version of Anaconda (4.1.0) you can simply right-click on a python script in Windows File Explorer and choose "Open with". The first time you do this you need to select "Choose default program" and then browse to spyder.exe in the Script directory in your Anaconda installation. Also make sure that the "Always use the selected program to open this kind of file" is unchecked and then click OK. From now on spyder.exe will always be listed as one of the options when you select "Open with" from the right-click menu in Windows File Explorer.
这篇关于如何让 Spyder 直接从 Windows 资源管理器打开 python 脚本(.py 文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何让 Spyder 直接从 Windows 资源管理器打开 python 脚本(.py 文件)


基础教程推荐
- 用于分类数据的跳跃记号标签 2022-01-01
- 线程时出现 msgbox 错误,GUI 块 2022-01-01
- 如何在海运重新绘制中自定义标题和y标签 2022-01-01
- Dask.array.套用_沿_轴:由于额外的元素([1]),使用dask.array的每一行作为另一个函数的输入失败 2022-01-01
- 何时使用 os.name、sys.platform 或 platform.system? 2022-01-01
- Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll 2022-01-01
- 筛选NumPy数组 2022-01-01
- 使用PyInstaller后在Windows中打开可执行文件时出错 2022-01-01
- 如何让 python 脚本监听来自另一个脚本的输入 2022-01-01
- 在 Python 中,如果我在一个“with"中返回.块,文件还会关闭吗? 2022-01-01