Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> Python

Cách chạy hàm Python trong dòng lệnh Eclipse (PyDev)

Sử dụng PyDev - plugin Python cho Eclipse.

Các cách chạy

  1. Run as Python Run: Chuột phải file -> Run As -> Python Run.
  2. PyDev Console: Window -> Show View -> Console -> PyDev Console. Import module và gọi hàm trực tiếp.
  3. Debug mode: Đặt breakpoint, Run As -> Python Debug.

Cài đặt PyDev

  • Help -> Eclipse Marketplace -> Tìm "PyDev" -> Install.
  • Cấu hình interpreter: Window -> Preferences -> PyDev -> Interpreters -> Python Interpreter.

Lưu ý: PyDev cung cấp code completion, refactoring, debugger, unittest integration.