On 15 January 2014 12:38, Julian Taylor <jtaylor.deb...@googlemail.com> wrote: > On 01/15/2014 11:25 AM, Daπid wrote: >> On 15 January 2014 11:12, Hedieh Ebrahimi <hedieh.ebrah...@amphos21.com >> <mailto:hedieh.ebrah...@amphos21.com>> wrote: >> >> I try to print my fileContent array after I read it and it looks >> like this : >> >> ["b'C:\\\\Users\\\\Documents\\\\Project\\\\mytextfile1.txt'" >> "b'C:\\\\Users\\\\Documents\\\\Project\\\\mytextfile2.txt'" >> "b'C:\\\\Users\\\\Documents\\\\Project\\\\mytextfile3.txt'"] >> >> Why is this happening and how can I prevent it ? >> Also if I have a line that starts like this in my file, python will >> crash on me. how can i fix this ? >> >> >> What is wrong with this case? If you are concerned about the multiple >> backslashes, they are there because they are special symbols, and so >> they have to be escaped (you actually want a backslash, not whatever >> else they could mean). >> > > you have the bytes representation and a duplicate slash in it. > Its due to unicode strings in python3.
So why does the array store the repr of a bytes string? Surely that's just a loadtxt bug and no one is actually depending on that behaviour. Oscar _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion