[Scipy-svn] r3211 - trunk/Lib/io
scipy-svn at scipy.org
scipy-svn at scipy.org
Wed Aug 1 04:08:03 EDT 2007
Author: cdavid
Date: 2007-08-01 03:07:47 -0500 (Wed, 01 Aug 2007)
New Revision: 3211
Modified:
trunk/Lib/io/mio.py
Log:
- correct wrong variable name for relative path in find_mat_file in mio.py
(should fix #473)
- make other cosmetic changes to make pylint happy in mio.py
Modified: trunk/Lib/io/mio.py
===================================================================
--- trunk/Lib/io/mio.py 2007-07-31 05:44:04 UTC (rev 3210)
+++ trunk/Lib/io/mio.py 2007-08-01 08:07:47 UTC (rev 3211)
@@ -10,7 +10,7 @@
from scipy.io.mio4 import MatFile4Reader, MatFile4Writer
from scipy.io.mio5 import MatFile5Reader, MatFile5Writer
-__all__ = ['find_mat_file','mat_reader_factory','loadmat', 'savemat']
+__all__ = ['find_mat_file', 'mat_reader_factory', 'loadmat', 'savemat']
def find_mat_file(file_name, appendmat=True):
''' Try to find .mat file on system path
@@ -21,14 +21,14 @@
if appendmat and file_name[-4:] == ".mat":
file_name = file_name[:-4]
if os.sep in file_name:
- full_file_name = file_name
+ full_name = file_name
if appendmat:
full_name = file_name + ".mat"
else:
full_name = None
- junk,file_name = os.path.split(file_name)
+ junk, file_name = os.path.split(file_name)
for path in sys.path:
- test_name = os.path.join(path,file_name)
+ test_name = os.path.join(path, file_name)
if appendmat:
test_name += ".mat"
try:
@@ -117,7 +117,8 @@
try:
file_name.write('')
except AttributeError:
- raise IOError, 'Writer needs file name or writeable file-like object'
+ raise IOError, 'Writer needs file name or writeable '\
+ 'file-like object'
file_stream = file_name
MW = MatFile4Writer(file_stream)
More information about the Scipy-svn
mailing list