title: How to make os.path.abspath(file) correct for folders beginning with "t"
body: <p>I often use <code>os.path.abspath(file)</code> on a file address entered via the command line to sanitize it before I handle the file.</p>
  
  <p>That means; performing the following:</p>
  
  <pre><code>outputPath = 'c:\Users\JEHOSHAPHAKSHAY\Desktop'
  os.path.abspath(outputPath)
  </code></pre>
  
  <p>gives the following output:</p>
  
  <pre><code>'c:\\Users\\JEHOSHAPHAKSHAY\\Desktop'
  </code></pre>
  
  <p>This is in the hope that the code is more robust on different platforms and for different kinds of user inputs.</p>
  
  <p>Recently I ran into an issue where this approach doesn't work as expected for a path that has one of the folders beginning with the letter <strong>t</strong></p>
  
  <p>That means; performing the following:</p>
  
  <pre><code>outputPath = 'c:\Users\JEHOSHAPHAKSHAY\Desktop\temp'
  os.path.abspath(outputPath)
  </code></pre>
  
  <p>gives the following output:</p>
  
  <pre><code>'c:\\Users\\JEHOSHAPHAKSHAY\\Desktop\temp'
  </code></pre>
  
  <p>How do I get this to give me the correct path -</p>
  
  <pre><code>'c:\\Users\\JEHOSHAPHAKSHAY\\Desktop\\temp'
  </code></pre>
  
  <p>without doing a find and replace as that is not elegant?</p>
  
  <p>Additionally, I don't mind using a raw string literal as long as I can prefix an existing string with a raw string literal.</p>