***********************
Your mail has been scanned by InterScan MSS.
***********************
On Thursday 26 October 2006 16:43, Wijaya Edward wrote:
> How can we print out the hidden character like
> "\n", "\r" etc in Python?
If it's meant to evidentiate then you should scan each byte an print it out
i.e.
o = open('yourfile'.'rb')
>>> o = open('paths.con','rb')
>>> for c in o.read():
... if c == '\n':
... print '\\n'
... if c == '\r':
... print '\\r'
... print c,
...
unfortunately it will be a space between each letter. Maybe using
sys.stderr.write (c) will avoid that.
F
--
http://mail.python.org/mailman/listinfo/python-list