Textscan function

I'm rewriting the program from MATLAB to Python. Is there a similar function in python textscan (textscan - reading data from a text file, converting and writing to an array of cells) or you will have to write a separate function

Sample program code:

fid = fopen(las_file);
file = textscan(fid, '%s', 'delimiter', '\n','whitespace', '');
fclose(fid);
Author: Deleted, 2012-07-27

1 answers

Perhaps you can use the Python csv file parser, I don't know what format you are going to read, but you can probably find more suitable parameters, according to the csv signature.

 1
Author: Kozlov Sergii, 2012-07-30 08:55:46