[Pythonmac-SIG] I know this is a stupid question
but................
Bill Bedford
billb@mousa.demon.co.uk
Thu, 9 Aug 2001 09:44:22 +0100
At 9:53 am +0200 09/08/01, Just van Rossum wrote:
>Bill Bedford wrote:
>
>> How do I get python to print a literal '=A3' -- that's a pound sign,
>> chr \163, unicode \xa3
>>
>> All I want to do is print the price in may catalogue.......
>
> print chr(163)
>
>works for me. If it doesn't: maybe the font you're using doesn't
>contain a pound
>symbol? Or do you have unicode string? In which case print
>s.encode('macroman')
>should work.
Doesn't work
>>> x =3D '=A3'
>>> x
'\xa3'
>>> chr(163)
'\xa3'
>>> x.encode('macroman')
'\xa3'
>>> x=3D u'=A3'
>>> x
u'\xa3'
>>> x.encode('macroman')
'\xa3'
Is there some thing in my set up that will prevent it working PM
7200, OS8.6, Carbon Python?