starting Python IDLE from command line to edit scr

2019-02-22 02:09发布

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 throwing any errors.

So how can I do the equivalent of opening IDLE, file>open>filepath via the command line (or perhaps even a Python module)?

7条回答
一夜七次
2楼-- · 2019-02-22 03:03

first make sure you have location of idle in path
I am using "python3.5".So mine looks like this: C:\Program Files\Python35\Lib\idlelib.Yours may differ.
use this following command:idle -r file_name.py to run the file or just idle file_name.py to edit


or start idle -r file_name.py ^&exit

查看更多
登录 后发表回答