I can look at it.

Would everyone be satisfied with a solution using regular expressions ?
That is, looking for the following pattern:

pattern = re.compile(r"""
    ^\s* # leading white space
    (.*) # Data
    %s?  # Zero or one comment character
    (.*) # Comments
    \s*$ # Trailing white space
    """%comments, re.VERBOSE)

match = pattern.search(line)
line, comment = match.groups()

instead of

line = line[:line.find(comments)].strip()

By the way, is there a test function for loadtxt and savetxt ? I couldn't
find one.


David

2008/2/26, Alan G Isaac <[EMAIL PROTECTED]>:
>
> On Tue, 26 Feb 2008, Lisandro Dalcin apparently wrote:
> > I believe the current 'loadtxt' function is broken
>
>
> I agree:
> <URL:
> http://projects.scipy.org/pipermail/numpy-discussion/2007-November/030057.html
> >
>
> Cheers,
>
> Alan Isaac
>
>
>
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to