Use IDLE to launch script using the full file path

不问归期 提交于 2019-12-30 05:26:08

问题


I'm currently using Notepad++ to edit my python script, and I would like to be able to use a shortcut to make my script run in IDLE. Currently, I have:

cd C:\Python32
pythonw.exe Lib\idlelib\idle.pyw -c "$(FULL_CURRENT_PATH)"

When I try to run it, I get a Syntax error on the : in C:\Users\...

However, if I omit -c, IDLE properly opens up the file in it's editor and then I am able to run it.

I feel like I'm missing something simple, can anyone help me out?


回答1:


Argument -c used to start the command, if you need to run a file, then use argument -r

I use this command: C:\Python27\Lib\idlelib\idle.bat -r "$(FULL_CURRENT_PATH)"



来源:https://stackoverflow.com/questions/6598426/use-idle-to-launch-script-using-the-full-file-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!