diff options
author | Stefan van der Walt <stefan@sun.ac.za> | 2008-11-29 14:53:44 +0000 |
---|---|---|
committer | Stefan van der Walt <stefan@sun.ac.za> | 2008-11-29 14:53:44 +0000 |
commit | b1343ae09fbfde2ba7e5ceaf734d73168de45fd2 (patch) | |
tree | e68e257d39e1adec1de0d5bde01f79d3e5ea69d7 /numpy/lib/io.py | |
parent | 91e5c320710f5ed1dfdfcc07eaad0cc5eccd8652 (diff) | |
download | numpy-b1343ae09fbfde2ba7e5ceaf734d73168de45fd2.tar.gz |
Identify file object using 'readline', rather than 'seek'.
Diffstat (limited to 'numpy/lib/io.py')
-rw-r--r-- | numpy/lib/io.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/io.py b/numpy/lib/io.py index 3d41abeef..b85022203 100644 --- a/numpy/lib/io.py +++ b/numpy/lib/io.py @@ -348,7 +348,7 @@ def loadtxt(fname, dtype=float, comments='#', delimiter=None, converters=None, fh = gzip.open(fname) else: fh = file(fname) - elif hasattr(fname, 'seek'): + elif hasattr(fname, 'readline'): fh = fname else: raise ValueError('fname must be a string or file handle') |