On May 16, 3:40 pm, gert <gert.cuyk...@gmail.com> wrote: > On May 16, 3:16 pm, "Diez B. Roggisch" <de...@nospam.web.de> wrote: > > > gert schrieb: > > > > open(os.path.join(os.path.dirname(__file__),'../www/bin/picture.png'), > > > 'rb') > > > how do you do this on windows (py3) so it still works on linux ? > > > os.path.join("..", "www", "bin", "picture.png") > > > Or use os.sep. > > > Diez > > IOError: [Errno 2] No such file or directory: 'C:\\Users\\gert\\Desktop > \\koen\\a > ppwsgi/wsgi\\..\\www\\bin\\picture.png' > > The os.path.dirname(__file__) is still in posix mode ?
DOH!!! forgot to actually put the file in the directory :) works both ways never mind the question, thanks. -- http://mail.python.org/mailman/listinfo/python-list