> On Fri, Nov 23, 2007 at 07:58:13AM -0500, Alan G Isaac wrote:
>> Specifically, is it not the case that the last line of
>> a text file is not guaranteed to have a terminator? Does
>> this not raise the possibility that a digit will be
>> clipped from the last line?
On Fri, 23 Nov 2007, Gae
On Fri, Nov 23, 2007 at 07:58:13AM -0500, Alan G Isaac wrote:
> > On Thu, Nov 22, 2007 at 11:14:07PM -0500, Alan G Isaac wrote:
> >> In numpy.core.numeric.py you will find loadtxt, which uses
> >> the following::
> >> line = line[:line.find(comments)].strip()
> On Fri, 23 Nov 2007, Gael
> On Thu, Nov 22, 2007 at 11:14:07PM -0500, Alan G Isaac wrote:
>> In numpy.core.numeric.py you will find loadtxt, which uses
>> the following::
>> line = line[:line.find(comments)].strip()
On Fri, 23 Nov 2007, Gael Varoquaux apparently wrote:
> Unless you are sure that line always ends
On Thu, Nov 22, 2007 at 11:14:07PM -0500, Alan G Isaac wrote:
> In numpy.core.numeric.py you will find loadtxt, which uses
> the following::
> line = line[:line.find(comments)].strip()
> I believe there is a bug here (when a line has no comment).
> To illustrate::
> >>> line = "12345
In numpy.core.numeric.py you will find loadtxt, which uses
the following::
line = line[:line.find(comments)].strip()
I believe there is a bug here (when a line has no comment).
To illustrate::
>>> line = "12345"
>>> comments = "#"
>>> line[:line.find(comments)]
'1234'
So