summaryrefslogtreecommitdiff
path: root/numpy/lib/io.py
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2008-11-29 14:53:44 +0000
committerStefan van der Walt <stefan@sun.ac.za>2008-11-29 14:53:44 +0000
commitb1343ae09fbfde2ba7e5ceaf734d73168de45fd2 (patch)
treee68e257d39e1adec1de0d5bde01f79d3e5ea69d7 /numpy/lib/io.py
parent91e5c320710f5ed1dfdfcc07eaad0cc5eccd8652 (diff)
downloadnumpy-b1343ae09fbfde2ba7e5ceaf734d73168de45fd2.tar.gz
Identify file object using 'readline', rather than 'seek'.
Diffstat (limited to 'numpy/lib/io.py')
-rw-r--r--numpy/lib/io.py2
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')