Hi
I'm trying to open a file with open() but i get this error i cant put my
finger how to fix. Code looks like this.
...
def OnStartaButton(self, event):
print "Startade ", ctime(time())
self.startOP.SetLabel(ctime(time()))
self.staticText7.SetLabel("Läser konfiguration.")
config = open("backup.conf", "r")
config.readline() #discard line
config.readline() #discard line
filsource=config.readline()
config.readline() #discard line
fildest=config.readline()
config.close()
self.staticText7.SetLabel("Läser katalogstruktur.")
...
When i'm executing it i get this error (runtime)
Traceback (most recent call last):
File "C:\python\boa\backup\backupwin.py", line 135, in OnStartaButton
config = open("backup.conf", "r")
TypeError: an integer is required
what does it want ? i can't figur it out ... the weird thing is that if
i put the exactly same line (the open line) in the python shell it
works. So why not in my program ?7
Thanks
Magnus
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor