usage of file separator

Thomas Wittek mail at gedankenkonstrukt.de
Mon Dec 31 11:59:02 EST 2007


devnew at gmail.com:
> for x in imagefilenames:
>      imgfile=folder+"/"+x
>       newimgfilenamelist.append(imgfile)
> 
> [..] how do i make it work on other os?

from os.path import join
#..
    imgfile=join(folder, x)

-- 
Thomas Wittek
Web: http://gedankenkonstrukt.de/
Jabber: streawkceur at jabber.i-pobox.net
GPG: 0xF534E231



More information about the Python-list mailing list