Newbie with Tkinter problems

Kerstin kerstin.dressler at web.de
Fri Nov 9 09:26:48 EST 2001


"Achim Domma" <achim.domma at syynx.de> wrote in message news:<9se7pq$e5s$04$1 at news.t-online.com>...
> "Kerstin Dressler" <kerstin.dressler at web.de> wrote in message
> news:3bea8c8a$1 at netnews.web.de...
> 
> > Also I've got problems with opening the files (the gif as well as the file
>  I
> > need for the Listbox).
> > -> logo = PhotoImage(file="./Power at work_transparent_8farben.gif")
> > -> liste = open('./envliste', 'r')
> > In both cases I get the error message: IOError: [Errno 2] No such file or
> > directory: './envliste'.
> > But both files are in the same directory as the py-script?
> > What could be wrong there?
> 
> If both files could not be opened I would guess that the path is wrong or
> you are not in the folder you think. I don't know excactly how python
> handles filenames, but it could be possible that you have to use \ instead
> of / on Windows 95. If that's not your problem try to show the current
> working dir with os.getcwd().
> 
> hope that helps
> 
> Achim

Hi,

the slashes aren't the problem. I'm now at another file with about the
same problems. But this time I'm using full pathnames. I also tried
the / and \ nothing seemed to change.
The problem was indeed the directory. I looked up another directory as
I thought I would. I put it right and it's working!

Thanx,
Kerstin



More information about the Python-list mailing list