Introduction to Python
Object Oriented Python
Python From Matlab
Note: If you get the error
Undefined variable "py" or class
or with my example specifically
Undefined variable "py" or class "py.PycClass.VehicleClass".
You may need to do one or both of the be below
- Got to follow instructions at:
- In matlab, you may need to add
import py.sys.path path.append('dir')
Where ‘dir’ is a string to the directory where the class you want is (the directory where PyClass.py is for my examples) . This tells the python instance running in MATLAB to look in ‘dir’ for the the class.