943,746 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 810
  • Python RSS
Oct 30th, 2008
0

Superscribe and subscribe

Expand Post »
Well my question is obvious.
I want to ask is it possible to write superscribe or subscribes in python ?
thanks!
Reputation Points: 13
Solved Threads: 0
Junior Poster
pywriter is offline Offline
115 posts
since Sep 2008
Oct 30th, 2008
0

Re: Superscribe and subscribe

Look here and see if it helps:

http://www.daniweb.com/forums/thread133360.html

if that isn't what you are looking for, maybe you can clarify what you are trying to do? is this going to be CLI or are you wanting to put something on a GUI?
Last edited by tyincali; Oct 30th, 2008 at 3:54 pm.
Reputation Points: 31
Solved Threads: 7
Light Poster
tyincali is offline Offline
45 posts
since Oct 2008
Oct 30th, 2008
0

Re: Superscribe and subscribe

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!
Reputation Points: 13
Solved Threads: 0
Junior Poster
pywriter is offline Offline
115 posts
since Sep 2008
Oct 31st, 2008
0

Re: Superscribe and subscribe

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
Reputation Points: 13
Solved Threads: 0
Junior Poster
pywriter is offline Offline
115 posts
since Sep 2008
Oct 31st, 2008
0

Re: Superscribe and subscribe

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.
Reputation Points: 930
Solved Threads: 668
Posting Maven
Gribouillis is offline Offline
2,655 posts
since Jul 2008
Oct 31st, 2008
0

Re: Superscribe and subscribe

In a terminal but if any of them is easier i will be happy to try
thanks
Last edited by pywriter; Oct 31st, 2008 at 11:36 am.
Reputation Points: 13
Solved Threads: 0
Junior Poster
pywriter is offline Offline
115 posts
since Sep 2008
Oct 31st, 2008
0

Re: Superscribe and subscribe

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:

python Syntax (Toggle Plain Text)
  1. nums = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f']
  2.  
  3. for a in nums:
  4. for b in nums:
  5. exec("print '\\\\x"+a+b+": \\x"+a+b+"'")
Last edited by tyincali; Oct 31st, 2008 at 12:30 pm.
Reputation Points: 31
Solved Threads: 7
Light Poster
tyincali is offline Offline
45 posts
since Oct 2008
Oct 31st, 2008
0

Re: Superscribe and subscribe

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.
Last edited by pywriter; Oct 31st, 2008 at 6:30 pm.
Reputation Points: 13
Solved Threads: 0
Junior Poster
pywriter is offline Offline
115 posts
since Sep 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Python (Django) vs PHP
Next Thread in Python Forum Timeline: What editor do you use and why?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC