i have implemented this now as
Code:
argv: list[str] = sys.argv
filepath = ""
if len(argv) < 2:
filepath = os.environ.get("ES_ARGV")
else:
filepath = argv[1]
if __name__ == '__main__' and len(filepath) > 0:
mesh = ngsolve.Mesh(filepath)
it seems that netgen does not propagate cmd args to the python interpreter.