title: How to read a file when building a python package
body: <p>I am building a python package which looks like the following structure for now : </p>
  
  <pre><code>my_pkg
     |- setup.py
     |- __init__.py
     |- main_func.py
     |- utils
           |- __init__.py
           |- mod1.py
           |- text.txt
           |- mod2.py
  </code></pre>
  
  <p>in <code>mod1.py</code> file, I have a function must use <code>text.txt</code>, this is how I work for reading <code>text.txt</code> file for now : </p>
  
  <pre><code>with open("./text.txt","rb") as f:
      content = f.readline()
  </code></pre>
  
  <p>But after I ran <code>setup.py</code> to install and import it, there is always an error : </p>
  
  <blockquote>
    <p>FileNotFoundError: [Errno 2] No such file or directory:
    './text.txt'</p>
  </blockquote>
  
  <p>I would appreciate any help. </p>