This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients DoctorEvil, terry.reedy
Date 2017-12-16.05:10:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513401015.65.0.213398074469.issue32315@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-12-16 05:11:07terry.reedyunlinkissue32315 messages
2017-12-16 05:10:15terry.reedysetrecipients: + terry.reedy, DoctorEvil
2017-12-16 05:10:15terry.reedysetmessageid: <1513401015.65.0.213398074469.issue32315@psf.upfronthosting.co.za>
2017-12-16 05:10:15terry.reedylinkissue32315 messages
2017-12-16 05:10:15terry.reedycreate