[Tutor] An old newbies "escape sequence" confusion

Q852913745 at aol.com Q852913745 at aol.com
Fri Sep 10 16:31:56 CEST 2004


In a message dated 10/09/2004 12:35:13 GMT Standard Time, 
nick at javacat.f2s.com writes:

> ... here's what I get with pythonwin:
>   
> >>>l = ['\a','\b','\f','\r','\w']
> >>>l
> ['\x07', '\x08', '\x0c', '\r', '\\w']
> >>>for i in l:
> ...  print i
> ...  
> BEL
> BS
> FF
>   
> \w
> >>>
>  
> I had to write in the BEL, BS and FF sequences cos outlook turned them into 
> squares, same as idle did.
>   
> Hope that helps a bit
>  Nick.
>   
> 

Thanks for the help, pythonwin does recognise the escape sequences although I 
still don't
understand why for example:
print "\a"  
does not sound a beep when run from the script window or interactive window 
(within the programming environment), but it does beep when run from the 
command line window outside the programming environment.
I may understand later in time.
Thanks again.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20040910/0aef3d87/attachment.html


More information about the Tutor mailing list