summaryrefslogtreecommitdiff
blob: 651c1f5ec37c8ee39446831bee3ed7688445ab4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- PyVTK-0.4.74/lib/__init__.py    2003-04-07 16:56:08.000000000 +0200
+++ PyVTK-0.4.74/lib/__init__.py   2008-12-03 18:08:35.000000000 +0100
@@ -202,7 +202,7 @@
         #print 'Reading file',`filename`
         f = open(filename,'rb')
         l = f.readline()
-        if not l.strip().replace(' ','').lower() == '#vtkdatafileversion2.0':
+        if not l.strip()[-3:] == '1.0' and not l.strip()[-3:] == '2.0' and not l.strip()[-3:] == '3.0':
             raise TypeError, 'File '+`filename`+' is not VTK 2.0 format'
         self.header = f.readline().rstrip()
         format = f.readline().strip().lower()
@@ -222,7 +222,7 @@
         for i in range(2):
             if only_structure: break
             if not l: break
-            l = [s.strip() for s in l.lower().split(' ')]
+            l = [s.strip() for s in l.lower().split()]
             assert len(l)==2 and l[0] in ['cell_data','point_data'], l[0]
             data = l[0]
             n = eval(l[1])