Substituting backlash by forwardslash : I am writing a python function that takes the string of a path as copy-pasted from windows (so with backslashes) and returns a string with forwardslashes, that can be used by python as a path. The problem arises with the combination of backlashes and other characters, like \n, \b...
I have tried two solutions: 1) turning the input string into raw; 2) escaping the backlashes. Please see my code:

    def back2forwardSlash(backSlash_string):
        '''input is the string of a path with backslashes (typically from windows) which are unusable in python'''
    
        backSlash_string_raw = "%r"%backSlash_string # turning the string to raw
        forwChars = []
        for char in backSlash_string_raw:
            if char == '\\': # escaping the backlashes
                forwChars.append('/')
            else:
                forwChars.append(char)
        forwPath = ''.join(forwChars)
        return forwPath
    a = back2forwardSlash('C:\Users\Dropbox\netCFD4\b30.137.nc')
    print a
This will return `'C://Users//Dropbox/netCFD4/x0830.137.nc'`, which gets it in one single instance but is wrong in two ways: 1) it adds two slashes in place of one, in some instances; 2) it turns `\b` into `/x08`. 
Do you have a solution please?