Terry J. Reedy <tjre...@udel.edu> added the comment:
https://docs.python.org/3/library/idle.html#startup-failure says "A common cause of failure is a user-written file with the same name as a standard library module, such as random.py and tkinter.py. When such a file is located in the same directory as a file that is about to be run, IDLE cannot import the stdlib file. The current fix is to rename the user file." In this case, the offending file and name is your Desktop/code.py. Rename it. ---------- resolution: -> not a bug _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42621> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com