简体   繁体   中英

How can I test commands in Python? (Eclipse/PyDev)

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!

There should be an interactive console in PyDev.

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM