I want to get the full command line as it was typed.
This:
\" \".join(sys.argv[:])
doesn\'t work here (deletes double quotes). Also I pr
You're too late. By the time that the typed command gets to Python your shell has already worked its magic. For example, quotes get consumed (as you've noticed), variables get interpolated, etc.