MCPcopy Create free account
hub / github.com/AMReX-Astro/Castro / get_next_line

Function get_next_line

Util/scripts/write_probdata.py:48–60  ·  view source on GitHub ↗

return the next, non-blank line, with comments stripped

(fin)

Source from the content-addressed store, hash-verified

46
47
48def get_next_line(fin):
49 """return the next, non-blank line, with comments stripped"""
50 line = fin.readline()
51
52 pos = line.find("#")
53
54 while (pos == 0 or line.strip() == "") and line:
55 line = fin.readline()
56 pos = line.find("#")
57
58 if pos == -1:
59 return line.strip()
60 return line[:pos]
61
62
63def parse_param_file(params_list, param_file):

Callers 1

parse_param_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected