0

I am working on a python application that uses paho mqtt client. I am setting client ID as "GUI" in my MQTT Class

class MqttClient(QtCore.QObject):
    def __init__(self):
        super().__init__()
        # Setup MQTT connection
        self.client = mqtt.Client("GUI")

But when I print the client ID using the below statement,

print ("Data published by :" + str (client._client_id))

I see this on the terminal

Data published by :b'GUI'

Can anyone explain the significance of the letter b and how do I print just "GUI" without string manipulation?

sa_penguin
  • 423
  • 3
  • 15

0 Answers0