0

I just setup PyDev with Eclipse, but I'm a little confused. I thought that in the console I would be able to type certain commands such as print("Hello World") and directly observe the result without having to incorporate that in any sort of file.

The reason I would like this is because it would allow me to test functions real quick before using them in scripts, and I'm also following a tutorial which tells me to check if NumPy is installed by typing import NumPy in the command line.

Thanks!

2 Answers 2

1

There should be an interactive console in PyDev.

Try Ctrl+Alt+Enter or Cmd+Alt+Enter.

Sign up to request clarification or add additional context in comments.

1 Comment

That linked helped me, I figured it out. I needed to change a setting in the PyDev console. Thanks.
0

Open up terminal and type python then it should load python shell then type import numpy

I have used pydev and find its easier just to use terminal to run small commands

3 Comments

I do this for R and should of thought of it. Great idea!
Even better, just make an alias for python -i -c 'import numpy'.
Both work. If you want to run something like a loop or something over several lines write a text file and save it as something like test.py and run that in the command window python environment. PyDev is good but I find that for conceptual testing just running things in terminal is better

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.