title: Having issues with file path handling after converting my application to an .exe
body: <p>I'm trying to run python file by from a different directory after converting it into an exe.</p>
  <p>For example let's say below is my project structure:</p>
  <pre><code>project_name/core/main.py
  project_name/core/app1.py
  project_name/core/app2.py
  project_name/logs/migration.log
  project_name/config/userconfig/user.json
  project_name/config/systemconfig/system.json
  project_name/logging.ini
  </code></pre>
  <p>And my <code>logging.ini</code> file contains:</p>
  <pre><code>[loggers]
  keys=root,main,app1,app2
  
  [handlers]
  keys=consoleHandler,fileHandler
  
  [formatters]
  keys=simpleFormatter,json
  
  [logger_root]
  level=CRITICAL
  handlers=consoleHandler
  
  [logger_main]
  level=DEBUG
  handlers=fileHandler
  qualname=main
  
  [logger_app1]
  level=DEBUG
  handlers=fileHandler
  qualname=app1
  
  [logger_app2]
  level=DEBUG
  handlers=fileHandler
  qualname=app2
  
  [handler_consoleHandler]
  class=StreamHandler
  level=DEBUG
  formatter=json
  args=(&quot;logs/migration.log&quot;,)
  
  [handler_fileHandler]
  class=FileHandler
  level=DEBUG
  formatter=json
  args=(&quot;logs/migration.log&quot;,'w')
  </code></pre>
  <p>In <code>main.py</code> I'm creating logging by using following code:</p>
  <pre><code>logging.config.fileConfig(os.path.join(os.path.dirname(__file__), '..', 'logging.ini'),
                            disable_existing_loggers=False)
  </code></pre>
  <p>When I run <code>main.py</code> from the <code>project_name</code> folder I have to give path in <code>args</code> field <code>logging.ini</code> like below:</p>
  <pre><code>[handler_consoleHandler]
  class=StreamHandler
  level=DEBUG
  formatter=json
  args=(&quot;logs/migration.log&quot;,)
  
  [handler_fileHandler]
  class=FileHandler
  level=DEBUG
  formatter=json
  args=(&quot;logs/migration.log&quot;,'w')
  </code></pre>
  <p>If I run <code>main.py</code> program from its path I have to give path like below:</p>
  <pre><code>[handler_consoleHandler]
  class=StreamHandler
  level=DEBUG
  formatter=json
  args=(&quot;../logs/migration.log&quot;,)
  
  [handler_fileHandler]
  class=FileHandler
  level=DEBUG
  formatter=json
  args=(&quot;../logs/migration.log&quot;,'w')
  </code></pre>
  <p>It's difficult when I run program from different folder path because every time I have to change path. How can I handle this easily?</p>