MCPcopy Index your code
hub / github.com/numpy/numpy / main

Function main

numpy/_build_utils/conv_template.py:313–331  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

311
312
313def main():
314 try:
315 file = sys.argv[1]
316 except IndexError:
317 fid = sys.stdin
318 outfile = sys.stdout
319 else:
320 fid = open(file, 'r')
321 (base, ext) = os.path.splitext(file)
322 newname = base
323 outfile = open(newname, 'w')
324
325 allstr = fid.read()
326 try:
327 writestr = process_str(allstr)
328 except ValueError as e:
329 raise ValueError(f"In {file} loop at {e}") from None
330
331 outfile.write(writestr)
332
333
334if __name__ == "__main__":

Callers 1

conv_template.pyFile · 0.70

Calls 4

openFunction · 0.85
process_strFunction · 0.70
readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…