Excellent. Thanks.
However, I have noticed that the gauge does
not show outside the garden folder. This is because kivy cannot load the
dial and needle graphics.
I have modified the code to load the pngs properly as below:
import os,inspect
class DummyClass: pass
class Gauge(Widget):
'''
Gauge class
'''
dummy = DummyClass
unit = NumericProperty(1.8)
value = BoundedNumericProperty(0, min=0, max=100, errorvalue=0)
mypath = os.path.dirname(os.path.
abspath(inspect.getsourcefile(dummy)))
file_gauge = StringProperty(mypath + os.sep + "cadran.png")
file_needle = StringProperty(mypath + os.sep + "needle.png")
I guess this is not the most efficient way to find the module path. Probably you can improve the code.
Regards,
Shibu