Loading startup file question

Paul Moore gustav at morpheus.demon.co.uk
Sat Dec 16 17:38:51 EST 2000


On Sat, 16 Dec 2000 11:39:27 +0200, Pearu Peterson <pearu at cens.ioc.ee>
wrote:
>sh> python -i -c 'from Numeric import *'
>
>But then python does not load $PYTHONSTARTUP.
>
>So, my question is: Is there a simple way to force python to load startup
>file when both -i and -c option are used?

It's a bit ugly, but there is always (on one line)

python -i -c "import os; execfile(os.environ['PYTHONSTARTUP'])"
          -c 'from Numeric import *'

Paul.



More information about the Python-list mailing list