title: Python exe not deleting itself
body: <p>I'm trying to create a python script to convert into exe which just deletes itself. When I run it as .py file it works. The code is this:</p>
  
  <pre><code>import os
  os.remove(os.getcwd + "\\test.py")
  </code></pre>
  
  <p>I'm working in Windows that's why I'm using \\ and the file is obviously named test.py. But when I convert it into an exe file (I've tried both with py2exe and pyinstaller) it gives me access denied error. Does anyone know how to fix this?</p>
  
  <p>PS: Yes, I've changed the name to test.exe if you're asking.</p>