Re: r"<path>"



Please describe the actual problem you're trying to solve. In what way
do slashes need to be "fixed," and why?

Well, I have decided to build a tool to help us sync files in UNC
paths. I am just building the modules and classes right now so I
haven't developed the frontend yet. I am assuming when the user
provides a path (either by typing it in, or pulling it in from a
config file), the UNC slashes are going to escape stuff in the string,
so I want to double them up.

I understand if the best way is to convert all the slashes to double-
slashes. But the 'r' function seemed so handy and convenient.

I am very new to Python, but not at all to programming.

Thanks!
.



Relevant Pages

  • Re: r""
    ... I have decided to build a tool to help us sync files in UNC ... config file), the UNC slashes are going to escape stuff in the string, ... While backslashes in string literals are ... escape characters that must be doubled up to convey literal backslashes, ...
    (comp.lang.python)
  • Re: Trouble running BAT file from P9...?
    ... slashes since a unc name has 2 slashes to begin with ... and you have to escape both of them. ... Even assuming that you can possibly run a batch file on another machine. ...
    (comp.databases.paradox)
  • Re: r""
    ... I have decided to build a tool to help us sync files in UNC paths. ... slashes are going to escape stuff in the string, ... Python's string is never escaped in-memory, ...
    (comp.lang.python)
  • Re: oniguruma : cant get it to search for (backslash)
    ... ArgumentError: Oniguruma Error: end pattern at escape ... In a regex literal a backslash is a metacharacter, ...
    (comp.lang.ruby)
  • Re: Prune double slahes
    ... are the slashes even there at all? ... Isn't the compiler trying to escape out the characters before it? ... Tossing that to a Textbox would display: ...
    (microsoft.public.dotnet.languages.csharp)