[Numpy-svn] r6123 - trunk/numpy/lib

numpy-svn@scip... numpy-svn@scip...
Sat Nov 29 08:53:57 CST 2008


Author: stefan
Date: 2008-11-29 08:53:44 -0600 (Sat, 29 Nov 2008)
New Revision: 6123

Modified:
   trunk/numpy/lib/io.py
Log:
Identify file object using 'readline', rather than 'seek'.

Modified: trunk/numpy/lib/io.py
===================================================================
--- trunk/numpy/lib/io.py	2008-11-29 12:09:07 UTC (rev 6122)
+++ trunk/numpy/lib/io.py	2008-11-29 14:53:44 UTC (rev 6123)
@@ -348,7 +348,7 @@
             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')



More information about the Numpy-svn mailing list