OSError: socket no longer exists (Python IDLE error)
<p>First let me give some background information that lead to the problem.
I had/have two versions of python installed in my Win 8.1 laptop. Originally Py 2.5 was set as the default. The way i did it was that i renamed the <code>python.exe</code>  of Python 3.5 as <code>python35.exe</code> and the file 
<code>pythonw.exe</code> 
as <code>pythonw35.exe</code> which seem to have created two <code>.dll</code> files with the same names to that of the two files (I don't remember whether the two dll files were present before the renaming) and successfully set Python 2.7 as default (i.e. when i typed the command <code>python</code> in the command line, python 2.7 ran). Recently i needed to set Python 3.5 as default. I then proceeded to rename the files of the version <code>Python 2.7</code> the same way and reverted the file names of the 3.5 version to their original normal formats (i.e. <code>python.exe</code> and <code>pythonw.exe</code>). </p>

<p><br>
After all this mayhem, i run <code>print("Hello World")</code> in the IDLE and it springs up the following error:</p>

<pre><code>IDLE internal error in runcode()
Traceback (most recent call last):
  File "C:\Python35-32\lib\idlelib\rpc.py", line 339, in putmessage
    r, w, x = select.select([], [self.sock], [])
TypeError: argument must be an int, or have a fileno() method.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python35-32\lib\idlelib\rpc.py", line 240, in asyncqueue
    self.putmessage((seq, request))
  File "C:\Python35-32\lib\idlelib\rpc.py", line 342, in putmessage
    raise OSError("socket no longer exists")
OSError: socket no longer exists
</code></pre>