0

I have both versions of python 3.7 and 2.7, I am trying to edit some old codes from version 2.7, however, I can only open IDLE from 3.7 version. What can I do in order to always open IDLE 2.7 with .py archives from that version?

  • 3
    What OS are you running? – Jack Thomson Nov 07 '19 at 20:59
  • 2
    Definitely not enough information here. For Windows, you can just right click, and "open with" IDLE 2.7, and that choice should stay. Linux really heavily depends on what distribution you are running. – AlgoRythm Nov 07 '19 at 21:01
  • Also, same for Mac. Click get info and choose 2.7 to always open with 2.7 – 1__ Nov 07 '19 at 21:03
  • @AlgoRythm the program that opens with Windows is dependent on the filename extension, not the full filename. Doesn't matter if you "open with" this time, the next time it will still go back to the default. – Mark Ransom Nov 07 '19 at 21:12
  • 1
    Possible duplicate of [How to run multiple Python versions on Windows](https://stackoverflow.com/questions/4583367/how-to-run-multiple-python-versions-on-windows) – Sheri Nov 07 '19 at 21:38
  • @Sheri: I don' think that question is a dup, since it's only about Windows and doesn't apply to IDLE — but contains a lot of useful information (related to Windows). – martineau Nov 07 '19 at 22:25
  • @martineau is there an OS other than Windows that will open IDLE when you try to run an arbitrary file? – Mark Ransom Nov 07 '19 at 23:35

1 Answers1

1

If on Windows, type default applications on the search bar, then find where the .py extension is and change it to the IDLE version you want.

Also, try to Open With any .py file and select the IDLE version you want, before pressing enter to open, make sure you select Use this for all .py extensions.

(Again, if on Windows)