I use the following code to read my data files
this works fine as long as the data file is not empty. When the data file is empty it give me an error and exit from the program. the data files are generated by simulations and do idea if data exists or not in given file.
I need to check if the data file has data or not and do not know how to do it with python (numpy). when I say data, it doesn't include comments starts with '#'. Every data file generated has comments, so even with bunch of comments it might not has any data.