MCPcopy Index your code
hub / github.com/python/cpython / Quitter

Class Quitter

Lib/code.py:343–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341
342
343class Quitter:
344 def __init__(self, name):
345 self.name = name
346 if sys.platform == "win32":
347 self.eof = 'Ctrl-Z plus Return'
348 else:
349 self.eof = 'Ctrl-D (i.e. EOF)'
350
351 def __repr__(self):
352 return f'Use {self.name} or {self.eof} to exit'
353
354 def __call__(self, code=None):
355 raise SystemExit(code)
356
357
358def interact(banner=None, readfunc=None, local=None, exitmsg=None, local_exit=False):

Callers 1

interactMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…