Easily detecting interactive mode is of general interest for customization.
1. What if C also set sys.flags.interactive in "python" mode,
or exposed sys.flags.implicit_interactive (but with better name)?
2. It's more useful to have a hook called when entering interactive mode,
rather than a flag that's set from the beginning:
$ python -i -c 'import sys; print sys.flags.interactive'
1
>>>
For this, importing _setupinteractive is a step forward;
calling e.g. sys.__interactivehook__ sounds even better.
(site.py would set it by default to a function that enables
rlcompleter, user can always override...)
BTW, drawback of doing any such setup in site.py: "python -S" would
be unfriendly!