reg exp and octal notation
nospam at freeworld.fr
Fri Mar 5 16:31:19 CET 2004
-- snip --
>> ('\x06\x1cabc',) string from source code
>> ('\\006\\034abc\n',) same string read from file
> In other words, the backslashes are seen as literal backslashes.
> readline() does no evaluation of the string, it just copies the
yeah... you are right guys. I have matched two problems
reg exp are innocents .
Ok. Let's say so:
I have to read each line of a file and strip a particular string from there
(a string containing octal notation too)
the problem is actually the file.readline() that doesn't return
what I was expected to.
pardon my 'newbyeeeee' but is there a way to read a line xy from that file
line xy: \006\034abc
and not every single char in it like now ?
(before I start to reinvent the wheel ....... :) )
More information about the Python-list