title: How to properly import constants defined in a different file in python
body: <p>When I run <code>python3 my_calendar.py</code>, inside the directory <code>my_calendar_project</code>, everything seems to work fine. The problem appears when I run "<code>python3 -m my_calendar_project</code>", so I receive the following error message: <code>"ModuleNotFoundError: No module named 'constants'"</code></p>
  
  <p>Directory tree and the error message:   </p>
  
  <p><a href="https://i.stack.imgur.com/3GM1R.png" rel="nofollow noreferrer">directory tree</a></p>
  
  <p><a href="https://i.stack.imgur.com/nC4t0.png" rel="nofollow noreferrer">error message</a></p>
  
  <pre><code>from datetime import date
  
  import constants
  import functions
  </code></pre>