How to convert a python string(include '\b') to a raw string?
<p>I use Maya to render my cartoon, and got a problem when I programming with python.
Maya gives me an string variable which is a path, and I want to convert it to a normalized path. However, when it comes to '\b', I totally failed to play with it. Here's the problem:</p>

<p>I want to convert the string in <strong>paths</strong> whose value looks like 'D:\notebook\bot' to 'D/notebook/bot':</p>

<pre><code>paths = ['D:\notebook\bot', 'D:\newworld']
for p in paths:
    p = '{0!r}'.format(p).replace('\\', '/').replace(':','')
    print p
</code></pre>

<p>The output is :</p>

<pre><code>D/notebook/x08ot
D/newworld
</code></pre>

<p>See, the \n is correctly printed out as /n, however, \b is being escaped as /x08.
How can I achieve what I want? Note I can't format the input paths as:</p>

<pre><code>paths = [r'D:\notebook\bot', r'D:\newworld']
</code></pre>

<p>because it's passed from Maya.
Python version is 2.6.</p>
