0

Well my question is obvious.
I want to ask is it possible to write superscribe or subscribes in python ?
thanks!

3
Contributors
7
Replies
8
Views
9 Years
Discussion Span
Last Post by pywriter
0

Hey thanks but in fact that wasn't what i wanted but very near
in fact i want to write a power for a number and as i know it must be superscript and no other choice.
again thanks!

0

Hey i tried "\xb" but it printed a black circle with a white question mark in it
and i'm using the python that is installed in ubuntu by default(i forgot to say)
thanks

0

Your question is not at all obvious. Where are you trying to write a superscript ? in a terminal ? a Tkinter canvas ? a printer ? a pdf document ? This is the main problem.

0

In a terminal but if any of them is easier i will be happy to try
thanks

0

The thing about outputting super/subscript in term is that it will vary from system to system. Experiment with the '\x##' replacing ## with any hex number from 01 to FF. Eventually you will find the characters you want to use.

this will print a list of every character for you:

nums = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f']

for a in nums:
	for b in nums:
		exec("print '\\\\x"+a+b+": \\x"+a+b+"'")
0

Hey tyincali i tried yours(including code tage containings),too.
but again no answer.
hey don't you think my problem is from my python or maybe linux?
i have problem in packages,too.

This topic has been dead for over six months. 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.