[Tutor] wierd error in comment string
Dave S
pythontut at pusspaws.net
Sun Apr 25 08:42:44 EDT 2004
Dave S wrote:
> Hi all, my python learning curve continues :-)
>
> I have a comment at the start of some experimental code ...
> 1 #!/usr/bin/env python
> 2
> 3 """
> 4 ...... blah blah
> 5 ....... blah blah
> 6
> 7 The ftse trades from 8:15 to 16:30
> 8 Expenses £8.50 per transaction + 1/2% on buying ... this equates
> 9 to 1.4% on a £2000 fund
> 10
> 11 This logger is v2 ... pulls less data to avoid being blacklisted
> 12 by the server.
> 13 """
> 14
> 15 import urllib,time,os,re
> 16
> 17 todaysdate=time.strftime('%Y%m%d')
> 18 old_ftsedata=''
> 19
>
> It appears to run OK but I get a warning message ...
>
> sys:1: DeprecationWarning: Non-ASCII character '\xa3' in file
> ./ftseloggerv2.py on line 9, but no encoding declared; see
> http://www.python.org/peps/pep-0263.html for details
>
> I looked up the web page .... got confused. I thought all characters
> inside """...""" were ignored ?
> Anyhow I deleted line 9, same error, deleted line 9 again, same error.
>
> Can anyone tell me in simple speak what has gone wrong ? :-\
>
> Thanks Dave
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
By a method of elimination it is the £ it does not like ....
I have to tell python to use a character set which includes a £ ?
Dave
More information about the Tutor
mailing list