title: Renaming file extension using pathlib (python 3)
body: <p>I am using windows 10 and winpython. I have a file with a .dwt extension (it is a text file). I want to change the extension of this file to .txt. </p>
  
  <p>My code does not throw any errors, but it does not change the extension. </p>
  
  <pre><code>from pathlib import Path
  
  filename = Path("E:\\seaborn_plot\\x.dwt")
  
  print(filename)
  
  filename_replace_ext = filename.with_suffix('.txt')
  
  print(filename_replace_ext)
  </code></pre>
  
  <p>Expected results are printed out (as shown below) in winpython's ipython window output:</p>
  
  <p>E:\seaborn_plot\x.dwt</p>
  
  <p>E:\seaborn_plot\x.txt</p>
  
  <p>But when I look for a file with a renamed extension, the extension has not been changed, only the original file exists. I suspect windows file permissions.</p>