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 could use something like this:
os.path.normcase(path)
Normalize the case of a pathname. On Unix and Mac OS X, this returns the path unchanged; on case-insensitive filesystems, it converts the path to lowercase. On Windows, it also converts forward slashes to backward slashes.
Else you could look for something else on this page