Nick Coghlan added the comment:

Paul Moore pointed out on distutils-sig that since this is mainly desired for 
the REPL, we can put the logic in the default excepthook rather than into the 
SyntaxError constructor the way we had to for "print" and "exec":

    def excepthook(typ, value, traceback):
        if typ is SyntaxError and "pip install" in value.text:
            print("'pip install' found in supplied text")
            print("Try running this from a system command prompt")
            return
        sys.__excepthook__(typ, value, traceback)

----------
title: Attempt to give better errors for shell commands typed into the REPL -> 
Attempt to give better errors for pip commands typed into the REPL

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

Reply via email to