[module] cygwin directory browser

Anton Vredegoor anton at vredegoor.doge.nl
Wed Jan 23 07:34:00 EST 2002


On Wed, 23 Jan 2002 15:08:15 +1300, "Mark Hadfield"
<m.hadfield at niwa.co.nz> wrote:

>No, neither of these works. I think the problem is deeper, inside Tkinter.
>I'll see if I can come up with a Tkinter-only test case that shows it.

I could reproduce your error and I hope I know now what went wrong. My
module documentation was unclear about where you can use "/cygdrive/"
and where you can't use it:

>TclError: couldn't open "/disk0/Program
>Files/Python/Python22/Tools/idle/Icons/folder.gif": no such file or
>directory

For some reason /disk0/ is not something Tcl recognizes as a valid
path. So you should not use /disk0/ to point to your idle directory
but use path names like "c:/":

line 62: sys.path.append(r'c:/Program Files/python22/Tools/Idle')

Tcl needs a "c:/" like path to find its icon files.

but at:

line 95: item = MyFileTreeItem('/cygdrive/')

Here it's ok to use cygwins drivenames.

If you can do: "cd /disk0/" in your shell, you could use "/disk0/"
instead of "/cygdrive/". In my shell only "cd /cygdrive/" or "cd c:/"
and such works so I can't check this "/disk0/" alternative.

I'm still interested in more feedback, so if you haven't given up by
now let me know if it works this time,

Anton.




More information about the Python-list mailing list