Fix Python – Platform independent path concatenation using “/” , “\”?
In python I have variables base_dir and filename. I would like to concatenate them to obtain fullpath. But under windows I should use \ and for POSIX / .
fullpath = “%s/%s” % ( base_dir, filename ) # for Linux
How can I make this platform independent?