[Numpy-discussion] passing "import numpy as np" as python command arg in 'doze

Robert Kern robert.kern@gmail....
Fri Aug 14 17:23:52 CDT 2009


On Fri, Aug 14, 2009 at 17:18, David Goldsmith<d_l_goldsmith@yahoo.com> wrote:
> Thanks, Skipper & Robert; perhaps I'm misunderstanding what should happen, but this doesn't appear to work in Windoze:
>
> Begin Terminal output:
>
> C:\Python26>python -c "import numpy as np"
>
> C:\Python26>
>
> End Terminal output.
>
> In other words, no error is returned, but python doesn't "stay running".

It's not supposed to, just like "python script.py" doesn't. Instead, use

  python -i -c "import numpy as np"

http://docs.python.org/using/cmdline.html

If you just want to execute some things before entering the
interpreter every time, use PYTHONSTARTUP instead. Or IPython.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco


More information about the NumPy-Discussion mailing list