notepad++运行python 如何调用 cmder 或 git bash
-
调用cmd的命令为 cmd /k python “$(FULL_CURRENT_PATH)” & PAUSE & EXIT
成功运行
安装cmder后,cmder可以正常使用,但是无法无法通过notepad调用 cmder /k python “$(FULL_CURRENT_PATH)” & PAUSE & EXIT更新一下进度,
/k 的问题解决了,需要变更为 /START
但是进入cmder后,显示 系统找不到指定的路径
可以给些参考吗,应该是文件路径的问题,但是目前还有有尝试出有效的方法,不胜感激. -
再更新一下进度,有网友说, cmder用的是conemu,可以设置自身环境变量。
有点不太明白,是需要在 Setting >> Startup >>Environment 里面进行设置的么 -
刚才又尝试了下,
cmd /k python “E:\cmder\test.py” & PAUSE & EXIT 这样执行是没有问题的
cmder /START python “E:\cmder\test.py” & PAUSE & EXIT 这样执行报没有这样的目录
所以, 运行 里 的命令 是 在cmder中执行的
在cmder 中执行 python “E:\cmder\test.py” & PAUSE & EXIT 是没有问题的
分析很可能是 /start 选项的语法问题 , 还没找到相关参考,待续 -
折腾半天, 通过迂回的方式解决了
cmder有 task(工作状态)的设定,
notepad下 运行 命令为 cmder /task “Cmder as Admin”
task 设定为 *cmd /k python “E:\cmder\test.py” & PAUSE & EXIT -new_console
这样,点运行,会运行我指定的文件(缺点是不灵活,换了文件就要重新设定命令,目前还不知道 当前目录文件的变量是啥) -
问题解决,感谢百度贴吧的 千城真人 吧友 ,
其原始命令为 C:\downloads\cmder_mini\Cmder.exe /task {cmd::Cmder}&"C:\npMingw64\mingw\bin\python3.exe $(FULL_CURRENT_PATH) &echo "
因为设置过环境变量, 精简为 cmder /task {cmd::Cmder}&"python $(FULL_CURRENT_PATH) " (后引号前空格不能省)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login