Windows -> Preferences -> PyDev -> Editor -> Code Style -> Code Formatter (checkboxes for spaces before and after)
A package is simply a directory with an __init__.py file inside it. For example:
mypackage/__init__.py <-- this is what tells Python to treat this directory as a package
A Python module is simply a Python source file, which can expose classes, functions and global variables
Modules should have short, all-lowercase names.
from mypackage.mymodule import myclass
ExamplePython (Project)
|
src -> ExamplePython (Package) -> roman.py
| |
| -> __init__.py
|
test -> ExamplePython (Package) -> romantest.py
| |
| -> __init__.py
To run the unit tests:
Control + F11 -> unittest
Control + Alt + Enter (when the roman.py file is selected) will open an interactive console
toRoman( 5 )
'V'
INCOMPLETE:
OR cd \workspace\ExamplePython\src (project) ... python
>>> from ExamplePython import roman ?