Is there a way to stop python from creating .pyc files, already in the shebang (or magic number if you will) of the Python script?
Not working:
#!/usr/bin/env python -B
Yes, if and only if, we assume the Python program runs in a somewhat POSIX compatible system (for /bin/sh), this will work:
(IMPROVED based on input from glglgl)
#!/bin/sh
"exec" "python" "-B" "$0" "$@"
# The rest of the Python program follows below: