Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (50.2k points)
I have recently installed both Python 2.7.1 and 2.6.5 versions on Windows. I have attached the path of Python 2.6.5 in the Environment Variables. I want to execute a Python script x.py in Python 2.6.5. When I am  Edit with the IDLE option, but this starts and runs the script using Python 2.7.1. Is there a way to start and run it with Python 2.6.5?

1 Answer

0 votes
by (107k points)

The usual command in the registry for Edit with IDLE is the following:

"C:\Program Files\Python33\pythonw.exe" "C:\Program Files\Python33\Lib\idlelib\idle.pyw" -e "%1"

Now, as you can notice, the path is mentioned in it, so it just cannot use a distinct Python interpreter like that. Here are some other options:

  1. The first way is to open IDLE 2.6, and simply work with the Open File dialog from the GUI.
  2. The 2nd way is to work with a different IDE that truly supports this functionality. 

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jan 5, 2021 in Python by ashely (50.2k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...