使NppExec了解Notepad ++中当前文件的路径(适用于Python脚本) [英] Getting NppExec to understand path of the current file in Notepad++ (for Python scripts)

查看:129
本文介绍了使NppExec了解Notepad ++中当前文件的路径(适用于Python脚本)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一段时间以来第一次使用Windows,并已使用notepad ++,并且正在使用nppexec插件运行python脚本.但是,我注意到notepad ++不会选择保存脚本的目录.例如,我将"script.py"放在我的文档"中,但是os.getcwd()打印"Program Files \ Notepad ++"

有人知道如何更改此行为吗?在Mac中不太习惯.

解决方案

Notepad ++> nppexec>关注$(当前目录)

Using windows for the first time in quite awhile and have picked up notepad++ and am using the nppexec plugin to run python scripts. However, I noticed that notepad++ doesn't pick up the directory that my script is saved in. For example, I place "script.py" in 'My Documents' however os.getcwd() prints "Program Files \ Notepad++"

Does anyone know how to change this behavior? Not exactly used to it in Mac.

解决方案

Notepad++ >nppexec >follow $(current directory)

这篇关于使NppExec了解Notepad ++中当前文件的路径(适用于Python脚本)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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