View Single Post
Old Jun 26th, 2005, 11:19 AM   #5
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
I'm curious as to your method of string concatenation. What inspired the concatenation via a list?
The best way to concatenate string representations of paths is via os.path.join. The function is kind enough to decide whether or not it needs to add a slash in the joined string, so os.path.join("/home/foo", "file.txt") and os.path.join("/home/foo/", "file.txt") both give you "/home/foo/file.txt".
Cerulean is offline   Reply With Quote