python3 - the hardest hello world ever ?

Brian Quinlan brian at sweetapp.com
Tue Oct 14 16:09:06 EDT 2008


Hey Helmut,

Did you try just:

print("Hallo, Süßes Python")

Cheers,
Brian

Helmut Jarausch wrote:
> Hi,
> 
> do I miss something (I do hope so) or is switching to Python3
> really hard for Latin1-users?
> 
> My simplest hello world script - which uses a few German
> umlaut characters - doesn't look very intuitive.
> I have to set an internal property (with leading underscore)
> for each output file I'm using - right?
> 
> #!/usr/local/bin/python3.0
> # _*_ coding: latin1 _*_
> 
> import sys
> 
> # the following call doesn't do the job
> # sys.setfilesystemencoding('latin1')
> 
> # but this ugly one (to be done for each output file)
> sys.stdout._encoding='latin1'
> 
> print("Hallo, Süßes Python")
> 
> 
> Thanks for any enlightening on that subject,
> Helmut.
> 





More information about the Python-list mailing list