starting Python IDLE from command line to edit scripts

后端 未结 7 1777
北荒
北荒 2021-01-12 02:25

I\'ve tried many variations of this command: idle.py -e filepath, but it simply starts IDLE like normal, not opening any extra windows for editing, and not thro

7条回答
  •  难免孤独
    2021-01-12 02:58

    Just add IDLE's path to your PATH environment variable.

    For example I created an environment variable called IDLE_PATH and set the value to C:\Python27\Lib\idlelib

    Then in my PATH variable I added ;%IDLE_PATH%; and open a new cmd prompt or in console2 just open a new tab and run idle to open the file, you will be able to do this from any directory. In IPython console add an ! before the command, for example !idle test.py.

    Congrates, Now you're a python pimp!

提交回复
热议问题