python - How to display caret symbol in wxPython static text widget? -


here snippet of code:

        self.diffusivity_label = wx.statictext(self, label=u'thermal diffusivity [m^2/s]') 

i display caret symbol static text can this: "thermal diffusivity [m^2/s]." after looking online, tried doing this:

        self.diffusivity_label = wx.statictext(self, label=u'thermal diffusivity [m\u20382/s]') 

doing displayed caret symbol, not elevated want look. instead, text looks this:

enter image description here

what can now? thank in advance help!

if wish write like: m²/s, use unicode codepoint called superscript two, \u00b2, looks like: ².

so, can say:

self.diffusivity_label = wx.statictext(self, label=u'thermal diffusivity [m\u00b2/s]') 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -