Hello Anas,
to clarify: the script which I posted represents one way how to manipulate data from Telemac result files and so it contains a lot of personal choices which other people would not need or would program in another way.
Some hints:
first you have to be sure that the directory parsers (which contains parserSELAFIN.py is in C:\opentelemac-mascaret\python27.
I recommend to have a look on the very good Python guide
Python Scientific Lecture Notes which covers also the basic use of Numpy, Scipy and Matplotlib. For example your FOR-loop in your script will not work. Furthermore I recommend a good Python editor with Syntax highlighting.
Try to use the print statements like print frames or print times in order to know what the variables are.
As I said there exist maybe better scripts for extracting variables etc. from 3D result files. However, and for even more confusion, accessing nodes from 3D result files is also straightworward since a nodenumber in 2D (nodenumber) corresponds to the nodenumber of the first layer in the 3D result file. The number of the node at the same horizontal coordinates and e.g. layer 3 is then nodenumber + 2 * number of nodes. The number of nodes is the number of nodes in the 2D mesh.
Hope this helps,
Clemens