If I run a python script via python foo.py then I can get the contents of the script by reading the file sys.argv[0]. Is it possible to get the contents of the script (e.g., as a string) if the script is passed to the python interpreter via python -c "$(cat foo.py)"?
As far as I know, it's not possible.
Get the text of a python script that is passed via the `-c` option