i start to wrote my fist class but i got a problem. I post my code here
this is my class: ST7735R.py
Code: Select all
width = 0
height = 0
class ST7735R:
def __init__(self, w, h):
self.width = w
self.height = h
def stampa(self):
return self.width
Code: Select all
from ST7735R import ST7735R
dspl = ST7735R(128,64)
value = dspl.stampa()
print('value = {}'.format(value))
Please some one can help me ?
Thank you
Sergio