def remove_backslashes(path):
 if (os.name == 'nt'):
  if (path.endswith('\\') and (not path.endswith('\\\\'))):
   path = path[:(-1)]
  path = path.replace('\\', '/')
  path = path.replace("/'", "\\'")
 return path

def remove_backslashes ( path ) : if ( os . name == 'nt' ) : if ( path . endswith ( '\\' ) and ( not path . endswith ( '\\\\' ) ) ) : path = path [ : ( - 1 ) ] path = path . replace ( '\\' , '/' ) path = path . replace ( "/'" , "\\'" ) return path
remove backslashes in *path* for windows platforms only .