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

Recommended Answers

All 7 Replies

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!

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

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.

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

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+"'")

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.

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.