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

Method _check

Lib/pdb.py:199–208  ·  view source on GitHub ↗

Check that target is plausibly a script.

(target)

Source from the content-addressed store, hash-verified

197
198 @staticmethod
199 def _check(target):
200 """
201 Check that target is plausibly a script.
202 """
203 if not os.path.exists(target):
204 print(f'Error: {target} does not exist')
205 sys.exit(1)
206 if os.path.isdir(target):
207 print(f'Error: {target} is a directory')
208 sys.exit(1)
209
210 @staticmethod
211 def _safe_realpath(path):

Callers 1

__init__Method · 0.95

Calls 3

existsMethod · 0.45
exitMethod · 0.45
isdirMethod · 0.45

Tested by

no test coverage detected