constructing absolute path with os.path.join()
问题 I'd like to construct an absolute path in python, while at the same time staying fairly oblivious of things like path-separator. edit0: for instance there is a directory on the root of my filesystem /etc/init.d (or C:\etc\init.d on w32), and I want to construct this only from the elements etc and init.d (on w32, I probably also need a disk-ID, like C: ) In order to not having to worry about path-separators, os.join.path() is obviously the tool of choice. But it seems that this will only ever