I refer to the example script in demo.py. I want to display a variable, how do I go about doing that?
I included var which is my variable after the string of fixed text like this: draw.text((device.width - padding - size[0], top + 32), 'Variable status is:', var, fill="white")
But I got an error on terminal:
TypeError: text() got multiple values for keyword argument 'fill'
I also tried draw.text((device.width - padding - size[0], top + 32), 'Variable status is: %s', fill="white") %var
How can I print variables in a draw.text function?
I refer to the example script in demo.py. I want to display a variable, how do I go about doing that?
I included
var
which is my variable after the string of fixed text like this:draw.text((device.width - padding - size[0], top + 32), 'Variable status is:', var, fill="white")
But I got an error on terminal:
TypeError: text() got multiple values for keyword argument 'fill'
I also tried
draw.text((device.width - padding - size[0], top + 32), 'Variable status is: %s', fill="white") %var
How can I print variables in a draw.text function?