I would like to import Matlab/Octave files of the .m sort into Python that look like this. # comment y=[1,2,3,4,5\ ,6,7,8,9]; # comment The only problem is I have to change the extensions from .m to .py. Is there a way to get python to import files that don't end in .py? Thank you