PYTHONSTARTUP and the -i command line option
peter at engcorp.com
Thu Jun 2 18:55:11 CEST 2005
Christopher Wood wrote:
> But these two things won't play together, as (by design, it seems)
> $PYTHONSTARTUP isn't read when the -i option is used, leaving me with an
> unenhanced Python interpreter environment after after script execution.
> Is the any way round this, other than editing all my scripts or manually
> loading the .pythonrc.py script in the interpreter?
Modifying the contents of your .pythonrc script and therein setting the
PYTHONINSPECT environment variable via os.environ comes to mind.
More information about the Python-list