I want to distribute my python script in pyc format(generated by python -OO -m py_compile run.py)
For different python versions, I've created run.cpython-36.pyc, run.cpython-38.pyc...
Now, if the users are using python3.6, they need to call python run.cpython-36.pyc, if they are using python3.8. they need to call python run.cpython-38.pyc. This is not convenient, how can I make python to auto-select the right pyc file to execute such that the user don't need to bother choosing the right version?
I figured out one solution: use a proxy script.
Something like:
And the users just call
python run_proxy.py