1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| def remplir(self):
name = askopenfilename(filetypes = [("all","*"),("ofeli","*.dat")])
if name:
try:
fichier = open(name,"r")
except IOError:
print "Error this file can not be opened"
else:
#invent=['#Param','Proj','Output','Plot','#Voltage Flag','Intpar','#angular Frequency','Doublepar','#Voltage','Complexpar','MeshFile','AuxFile','EOF']
#for a in invent:
#if a[0]!='#':
#val=fichier.readline()
#self.a.set(val)
a=fichier.readline()
if a[0] !='#'
self.fichname.set(a)
b=fichier.readline()
if b[0]='P'
self.output.set(b)
#c=fichier.read()
#self.plot.set(c)
#d=fichier.read()
#self.intpar.set(d)
#e=fichier.read()
#self.doublepar.set(e)
#f=fichier.read()
#self.complexpar(f)
#g=fichier.read()
#self.meshfile.set(g)
#h=fichier.read(s)
#self.auxfile.set(h)
else:
print "no file selected!" |
Partager