pass Command line arguments as with python interpreter

More
2 years 10 months ago #4170 by Kai
if i do
Code:
argv = sys.argv print(argv)

and call this code with python it works as expected but with netgen argv is empty. How can i pass Command line arguments ?

Thank you :-)
More
2 years 9 months ago - 2 years 9 months ago #4184 by Kai
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.
Last edit: 2 years 9 months ago by Kai.
Time to create page: 0.105 seconds