Hello ! Recently I was doing some text formatting using python and this forum was extremely handy. My problem now is to put any letter in subscript or superscript. Apparently in Unicode there are just a few symbols in superscript but I want to put let say letter "b" in superscript. How I can do this ?
thanks beforehand
deonis 0 Light Poster
Recommended Answers
Jump to PostAs Namibnat has already stated, it depends on what you are using to print it. Obviously, if you are printing in the terminal you are limited to ASCII characters and can not do it, as you stated yourself, so you will have to be more specific than just stating that …
Jump to PostIf you want to display the result you have to use a GUI toolkit like PyQt. The PyQt label widget can display html formatted text like this example shows:
http://www.daniweb.com/forums/post1093216.html#post1093216
Jump to PostThanks Allot very helpful ! Is there are way to do a same thing but with tkinter? Sorry, I want to much probably !
To my knowledge Tkinter has no widget that interprets html code. However wxPython has a wx.html.HtmlWindow() that works similarly.
All 9 Replies
Namibnat 10 Junior Poster in Training
deonis 0 Light Poster
woooee 814 Nearly a Posting Maven
deonis 0 Light Poster
jcao219 18 Posting Pro in Training
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
deonis 0 Light Poster
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
deonis 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.