How can I add a trailing slash (/ for *nix, \\ for win32) to a directory string, if the tailing slash is not already there? Thanks!
/
\\
You can do it manually by:
path = ... import os if not path.endswith(os.path.sep): path += os.path.sep
However, it is usually much cleaner to use os.path.join.