New submission from Terry J. Reedy:

In the first section of the doc for site.py, after

"After these path manipulations, an attempt is made to import a module named 
sitecustomize, which can perform arbitrary site-specific customizations. It is 
typically created by a system administrator in the site-packages directory. If 
this import fails with an ImportError exception, it is silently ignored."

I propose to add (something like)

"If python is started without output streams available, as with pythonw on 
Windows (used by default to start Idle), attempted output from sitecustomize is 
ignored. Any exception other that ImportError causes a silent and perhaps 
mysterious failure of the process."

This issue was stimulated by someone asking on python-list about print() outout 
appearing when starting the console interpreter but not when starting Idle (on 
Windows).  I then tested the result of an excecption other than ImportError. At 
the console, nothing visible happens until a new prompt appears.

C:\Programs\Python34>pythonw -m idlelib.idle

C:\Programs\Python34>

If Idle is already running, the attempt to run a file with F5 gives a messages 
about not being able to connect to the subprocess (which silently failed).

----------
components: Library (Lib)
keywords: patch
messages: 214512
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Document sitecustomize.py problems with pythonw
versions: Python 2.7, Python 3.4, Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21026>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to