Or, why doesn't this work, assuming you correctly set the file as executable? (On my system it just hangs, but can be killed with ^C.)
#!/usr/bin/env TEST=TEST python
print('hello')
While this does:
#!/usr/bin/env python
print('hello')
As does this:
[fred@pc build]$ /usr/bin/env TEST=TEST python hello.py
hello
Since version 8.30 env has the option -S, which make things work also in linux:
Use
#!/usr/bin/env -S TEST=TEST python
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With