starting Python IDLE from command line to edit scripts

后端 未结 7 1822
北荒
北荒 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

    Rarely the native os is useful. I created a 'win batch file, in the folder with my .py files:

    start /MIN cmd /C c:\Python27\lib\idlelib\idle.py -e %1 %2 %3 %4 %5 %6
    

    This can open up to six files from cmd line in one shot. Just type the name of the batch file, followed by from zero to six filenames. Also if one or more files you specify are not found, idle opens these as new document(s).

提交回复
热议问题