MCPcopy Index your code
hub / github.com/RustPython/RustPython / is_python

Method is_python

Lib/http/server.py:1119–1122  ·  view source on GitHub ↗

Test whether argument path is a Python script.

(self, path)

Source from the content-addressed store, hash-verified

1117 return executable(path)
1118
1119 def is_python(self, path):
1120 """Test whether argument path is a Python script."""
1121 head, tail = os.path.splitext(path)
1122 return tail.lower() in (".py", ".pyw")
1123
1124 def run_cgi(self):
1125 """Execute a CGI script."""

Callers 1

run_cgiMethod · 0.95

Calls 2

splitextMethod · 0.80
lowerMethod · 0.45

Tested by

no test coverage detected