[PythonCE] Tkinter PhotoImage, no such file or directory
Gonzalo Monzón
gmc at serveisw3.net
Sun Apr 30 11:40:11 CEST 2006
Patrick Kramer escribió:
><quote who="Luke Dunstan">
>
>
>>You can tell Python using os.chdir(), but that will not necessarily have any
>>effect on Tkinter because the operating system has no concept of a "current
>>directory", so it depends on whether the image file is opened in the Python
>>code or the C code.
>>
>>Luke
>>
>>
>>
>
>So there is no way for python to return the current directory it is in?
>
>say something like:
>
>dir = return_dir()
>
>image_loc = dir + "//BtnGluco.gif"
>
>Or:
>
>image_loc = dir + "//assets//img//BtnGluco.gif" #This is how I would like to orgnize it
>_______________________________________________
>PythonCE mailing list
>PythonCE at python.org
>http://mail.python.org/mailman/listinfo/pythonce
>
>
>
Hi,
I use this:
if (OS == "ce"):
path = sys.path[0]
else:
path = os.curdir
It works right for me.
Gonzalo Monzón.
More information about the PythonCE
mailing list