starting Python IDLE from command line to edit scripts

后端 未结 7 1782
北荒
北荒 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:39

    Please forgive me for bumping such an old thread, but I've been teaching myself linux and python with the help of the community, and was trying to figure out how to invoke IDLE2 and IDLE3 from the command line. I came across this post some of the solutions seemed a bit complicated for my application. Then it occurred to me that I could just put syslinks in the /usr/bin/ path for each.

    sudo ln -s idle-python3.1 idle3
    sudo ln -s idle-python2.6 idle2
    

    to address the OP. From the directory the script is located, type:

    idle3 abc123.py 
    

    or

    idle2 abc123.py
    

    I'm just so damned happy that I finally had a "light bulb" go off that I wasn't going to let a 2 year old post stop me from posting my solution.

提交回复
热议问题