[Numpy-discussion] fromfile() for reading text (one more time!)
Pauli Virtanen
pav at iki.fi
Tue Jan 5 15:01:36 EST 2010
ma, 2010-01-04 kello 17:05 -0800, Christopher Barker kirjoitti:
[clip]
> I also notice that it supports separators of arbitrary length, which I
> wonder how useful that is. But it also does odd things with spaces
> embedded in the separator:
>
> ", $ #" matches all of: ",$#" ", $#" ",$ #"
>
> Is it worth trying to fix that?
That's a documented feature:
sep : str
Separator between items if file is a text file.
Empty ("") separator means the file should be treated as binary.
Spaces (" ") in the separator match zero or more whitespace
characters. A separator consisting only of spaces must match at
least one whitespace.
--
Pauli Virtanen
More information about the NumPy-Discussion
mailing list