I am using python code to transmit data collected (Wii Nunchuck) via I2C wirelessly to another wireless node and then display the information about button press and also roll, yaw and pitch (X,Y,Z) data. The code uses Wx python for frame/window display. Part of the code was copied from the company that sells the wireless devices.

[self.panel.text.SetLabel('%d' % xdata)]

The code above displays the data (xdata) in a window. My question has to do with the % (percent) symbol. I have seen it used to mod data but I cannot find a reference as to how the label '%d' and % functions.

Can someone explain what the % key means or its function as i cannot find its usage in any python manual.


6 Years
Discussion Span
Last Post by snippsat
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.