I reading list of paths from XML, path contain irregular elemnts uses by a certian application that translate them internaly. the current path string is usless for me and I wish to normaliz them.
example:
path = "%personal%\new_lcation\%vendorlibs%\generated"
# split this to a list
omponents = path.split(os.sep)
# replace elemnts 0,2
components[0]="c:\ProgramFiles"
components[2]="somthing"
How do I join everythings now to standard path string?
thanks
"\n"is the newline character. When working with paths on Windows, use raw strings, such asr"%personal%\new_lcation\%vendorlibs%\generated".