I have a python script that needs to be started with the -3
option to check for python 3 incompatibilities. I managed to do so using the following hashtag:
#!/usr/bin/python -3
But because I need to run the script in a virtualenv
environment, I cannot use an absolute path in the shebang, so I use
#!/usr/bin/env python
which works fine, except the option '-3' is missing (because it is not possible to use it in this context anymore)!
Is there a way to 'activate' this option in the code itself? To enable the 2to3
warnings during the run of the code?