As nobody decried the idea of this being a bug, it now is :)
http://bugs.python.org/issue3137
/Geoff
--
http://mail.python.org/mailman/listinfo/python-list
Ben is correct in his interpretation of what I'm trying to say. The
code "should surely be changed" so that it lets a KeyboardInterrupt
exception through.
Geoff
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 18, 12:26 pm, Ben Finney <[EMAIL PROTECTED]>
wrote:
> John Machin <[EMAIL PROTECTED]> writes:
> > On Jun 18, 12:51 am, geoffbache <[EMAIL PROTECTED]> wrote:
> > [snip]
> > > Is this a bug? I couldn't find any code, but I imagine something like
> > > try:
> > > import site
> > > except:
John Machin <[EMAIL PROTECTED]> writes:
> On Jun 18, 12:51 am, geoffbache <[EMAIL PROTECTED]> wrote:
> [snip]
> > Is this a bug? I couldn't find any code, but I imagine something like
> > try:
> > import site
> > except:
> > sys.stderr.write("import site failed; use -v for traceback\n")
On Jun 18, 12:51 am, geoffbache <[EMAIL PROTECTED]> wrote:
[snip]
> Is this a bug? I couldn't find any code, but I imagine something like
> try:
> import site
> except:
> sys.stderr.write("import site failed; use -v for traceback\n")
>
> which should surely allow a KeyboardInterrupt excep
To clarify: this is more serious than an incorrect error message, as
the intended interrupt gets swallowed and
script execution proceeds. Sometimes I seem to get half-imported
modules as well,
the script failing later with something like
AttributeError: 'module' object has no attribute 'getenv'
Hi all,
I find that I semi-frequently get the cryptic message
import site failed; use -v for traceback
printed on standard error when an arbitrary python script receives
SIGINT while the python interpreter
is still firing up. If I use -v for traceback I get something along
the lines of
'import