title: How to know the current file path after being frozen into an executable using cx_Freeze?
body: <p>I am making games in Python. Since I am using Python3, I have to cx_Freeze my scripts into executables to let other people who don't have Python3 run the games. I've put the resources (textures, audio, files etc.) in a folder that was related to the script path. When I didn't cx_Freeze the script, I used <code>__file__</code> to locate the script and use this to locate the resources and use them. But once frozen using cx_Freeze, this method doesn't work.</p>
  
  <p>My question is, how can find the file path of a script after it is being frozen using cx_Freeze?</p>
  
  <p>I've tried <code>__file__</code>, os module and any other modules related to file paths.</p>
  
  <pre class="lang-py prettyprint-override"><code>path = str(__file__).split("/")
  path.remove("My executable name")
  path.remove("MacOS")
  path = "/".join(path) + "/Resources/"
  </code></pre>
  
  <p>I expected to return my Resources folder, but <code>__file__</code> only returns my home directory so this causes a traceback.</p>