Terry J. Reedy <tjre...@udel.edu> added the comment: Your posted code and much else runs fine for me with 2.7.14 on Win 10. Millions of lines of legal Python code run on perhaps a million machines aroung the world. Except possibly for your particular machine, your conclusion is wrong.
>From the traceback, you are running code via IDLE, most likely from the >editor. Please specify exactly what you do to get the error, starting with >which 2.7.z patch release you are using. When current Python and IDLE are correctly installed, PyShell.use_subprocess is set to True nearly first thing on startup. If one starts IDLE with the '-n' option, use_subprocess is set to False. The variable is never deleted. This is the first report I know of where Python sees use_subprocess as missing. Why? I can think of the following possibilities of what might be wrong on your machine: * Your python installation has a severe bug. If you need help with re-installing, try the python-list mailing list. * Hardware bug. See a tech. * You are using an obsolete version of 2.7 and ran into a bug since fixed. Upgrade to 2.7.14. * You have MacOS and ignored https://www.python.org/download/mac/tcltk/. Click Help and About IDLE and the box will include the tcl/tk version being run. Follow the instruction very carefully. None of the above are in scope for this tracker. * You somehow triggered a severe super-obscure bug. If you convince me that there might plausibly be a bug in IDLE, and agree to help investigate, I will try to find and fix it. For a start, run "python -m test" on a terminal or command line, where 'python' is the specific command to run 2.7 on your OS. ---------- status: -> open _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32315> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com