如何让 Spyder 直接从 Windows 资源管理器打开 python 脚本(.py 文件) [英] How to get Spyder to open python scripts (.py files) directly from Windows Explorer

查看:25
本文介绍了如何让 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 文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆