You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
python -m idlelib.pyshell # and
python f:/dev/3x/lib/idlelib/pyshell.py # for instance
no longer start IDLE properly. The separate subprocess startup command for when pyshell is the main, from 2004, is obsolete and no longer needed. The command needed is the same as for when IDLE is started otherwise. It works with either method of starting IDLE with pyshell.
In addition, two modules are created from pyshell.py, with names '__main__' and 'idlelib.pyshell'. The attempt to prevent this should be at the top of the file instead of the bottem and now needs to add 'idlelib.pyshell' instead of 'pyshell'. The test for this was to (temporarily) add 'print('running')' at the top of the file and see if 'running\n' is printed to the terminal once or twice.
An automated test might be done as follows:
Move imports in main(), including that of 'testing', to top of file.
Add, for instance, 'if testing: print('running') after the import.
Use test.support for 'with <captured stdout>: run pyshell.py'.
Check captured stdout for exactly one 'running' occurrence.
The shell actually 'starts', but with an empty box and no prompt.
I am thinking of eventually deprecating and disabling starting with pyshell, but until we do, it should work. If nothing else, we should be able to display a deprecation notice if that becomes appropriate.
The lack of reports does suggest that most affected people either switched to an approved method or another IDE.