Search code examples
pythonbindingportpython-idle

port binding error, on Python opening


When I open Python's IDLE, sometimes and error name 'port binding error' is accrues, and IDLE is filed to run on the computer. one this error accrues, it will repeat every time I'll open IDLE, till the computer will be restarted. the error box saies: ' ILDE can't bind to a TCP/IP port, which is necessary to communicate with its Python execution server. This might be because no networking is installed on this computer. Run IDLE with the -n command line switch to start without a subprocess and refer to help/IDLE Help 'Running without a subprocess' for further details.'

WTF?


Solution

  • Every command you type into the idle after >>> will usually be sent to another subprocess that executes it => the UI can do what it wants, the user can do as he/she likes. If you use Tkinter to create your own GUI, this can prevent you from crashing the IDLE windows.

    IDLE uses port 3000 I think. It could be that there is something listening there for connections other than the subprocess.

    in the folder of idlelib:

    import idlelib
    print idlelib.__file__ 
    

    there is the idle.py, idle.pyw and idle.bat that can be started with -n to not make a new subproces.

    I hope your WTF is answered.