[Tutor] How to replace the '\'s in a path with '/'s?

Richard D. Moores rdmoores at gmail.com
Sun Jul 31 19:50:41 CEST 2011


On Sun, Jul 31, 2011 at 10:34, Peter Otten <__peter__ at web.de> wrote:
>
> Richard D. Moores wrote:
>
> >> What happens if the path looks like
> >>
> >> r"C:relative\path\to\my\file.txt"
> >>
> >> or
> >>
> >> r"C:/mixed\slashes.txt"?
> >
> > Not quite sure what the intent of your question is, but all the paths
> > I want to modify are full, with only back slashes.
>
> If you invoke your fwd2bk_path_slashes() with one of those paths it'll stay
> in the while loop forever (until it runs out of memory).
>
> I'd consider that a bug that you should be aware of.

Yes. Thanks.

Dick


More information about the Tutor mailing list