python -i test.py
(and not just with "python test.py"). the reason is that i'm doing
some very expensive and lengthy initialization in my test.py program
that will be useless unless the program exits to the python prompt
when it is done, where the user can run further python commands.
obviously i can't use sys.argv since that is only for parameters
passed to the test.py program, not for parameters passed to the python
interpreter itself. i haven't found a way to access these options...
any help would be greatly appreciated!
> how do you determine, from within a python program, whether the python
> interpreter was launched in interactive mode?
sys.flags.interactive or sys.flags.inspect