[issue32315] can't run any scripts with 2.7.x, 32 and 64-bit

2017-12-13 Thread Martin

New submission from Martin :

When I try to run a really simple script like:
def fun(a):
print a
return

I get this error:

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python27\lib\lib-tk\Tkinter.py", line 1541, in __call__
return self.func(*args)
  File "C:\Python27\lib\idlelib\MultiCall.py", line 166, in handler
r = l[i](event)
  File "C:\Python27\lib\idlelib\ScriptBinding.py", line 149, in run_module_event

if PyShell.use_subprocess:
AttributeError: 'module' object has no attribute 'use_subprocess'

It basically means Python is only usable by copy-pasting code into Shell, any 
kind of script fails with that error.

--
components: Library (Lib)
messages: 308260
nosy: DoctorEvil
priority: normal
severity: normal
status: open
title: can't run any scripts with 2.7.x, 32 and 64-bit
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32315] can't run any scripts with 2.7.x, 32 and 64-bit

2017-12-15 Thread Terry J. Reedy

Terry J. Reedy  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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32315] can't run any scripts with 2.7.x, 32 and 64-bit

2017-12-15 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
Removed message: https://bugs.python.org/msg308454

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32315] can't run any scripts with 2.7.x, 32 and 64-bit

2017-12-16 Thread Martin

Martin  added the comment:

I used Python on other machines, I know how it's supposed to work. I'm using 
Windows 7 and this problem happened with 2.7.14, 2.7.13 and 2.7.9. I didn't 
bother trying all other versions because it looked like it didn't matter what 
version it was. For every version, I was running scripts with PyShell file (59 
KB) from idlelib.

I found another two files called "idle" in idlelib, one with and other without 
console. Either of those when ran starts Shell window and I can run scripts 
perfectly fine from there. 

I don't know what the problem is with PyShell file, but since with idle files 
it works as expected, I won't chase the cause of this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32315] can't run any scripts with 2.7.x, 32 and 64-bit

2017-12-19 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
resolution:  -> not a bug
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com