[Tutor] small graphics question

nathan tech nathan-tech at hotmail.com
Tue Feb 9 20:41:39 EST 2021


Hi Alan,


thanks for your clarifications here I genuinely was not sure.


I didn't want to go over there only to have them be like "laud, this 
guy. It's so obvious!"


I'll hop over and see what they have to say.


V best

Nathan

On 10/02/2021 01:09, Alan Gauld via Tutor wrote:
> On 09/02/2021 22:36, nathan tech wrote:
>
>> I am pondering a simple question:
>>
>> How do I write x to the power of y, in python/
> Its not simple, its extremely difficult!
>
> The reason is it depends on many factors including
> choice of font and OS. Being wxPython the OS issues
> are hopefully dealt with there. But the font
> issues remain.
>
>> Not 5^2 for 5 squared, but 5 superscript 2? or 5 superscript x where x
>> is any number?
>>
>> Similarly, how do I produce fractions??
> This is all about producing smaller characters and
> then raising or lowering them above the baseline.
>
> The easiest way may be to create an HTML text window
> and use HTML and CSS to create the effects you want.
> HTML can certainly do super and sub scripts
>
>> I asked here in the end because I figure for wx python it is just
>> tracking down that character sequence and then writing it on screen
> Not that simple and the wxPython crowd probably have
> more people who do this kind of thing regularly.
>
>


More information about the Tutor mailing list