1 """File that contains only a list (for instance points)"""
2
3 import re,os
4 from os import path
5
6 from PyFoam.Basics.LineReader import LineReader
7 from SolutionFile import SolutionFile
8
10 """Represents a OpenFOAM file with only a list"""
11
13 """@param place: directory of the file
14 @param name: The name of the list file"""
15
16 SolutionFile.__init__(self,place,name)
17
19 """@return: the size of the list"""
20
21 size=-1L
22
23 l=LineReader()
24 self.openFile()
25
26 erg=""
27
28 while l.read(self.fh):
29 try:
30 size=long(l.line)
31 break
32 except ValueError:
33 pass
34
35 self.closeFile()
36
37 return size
38