I would like to execute a python file app.py like below:
python app.y
But I would like to pass to this file a new value = 'ok' for the env variable called 'training'.
How can I do this from shell with a single command?
I would like to execute a python file app.py like below:
python app.y
But I would like to pass to this file a new value = 'ok' for the env variable called 'training'.
How can I do this from shell with a single command?
I think the approach should be a little different:
$ export training=ok
import os
print(os.getenv('training'))
Another option would be to use parameters and parse them with something like argparse.