/usr/lib/python3/dist-packages/bpython/curtsiesfrontend/sitefix.py is in bpython3 0.15-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import sys
from six.moves import builtins
def resetquit(builtins):
"""Redefine builtins 'quit' and 'exit' not so close stdin
"""
def __call__(self, code=None):
raise SystemExit(code)
__call__.__name__ = 'FakeQuitCall'
builtins.quit.__class__.__call__ = __call__
def monkeypatch_quit():
if 'site' in sys.modules:
resetquit(builtins)
|