title: How to make an "always relative to current module" file path?
body: <p>Let's say you have a module which contains</p>
  
  <pre><code>myfile = open('test.txt', 'r')
  </code></pre>
  
  <p>And the 'test.txt' file is in the same folder. If you'll run the module, the file will be opened successfully.</p>
  
  <p>Now, let's say you import that module from another one which is in another folder. The file won't be searched in the same folder as the module where that code is.</p>
  
  <p><strong>So how to make the module search files with relative paths in the same folder first?</strong></p>
  
  <p>There are various solutions by using "<code>__file__</code>" or "<code>os.getcwd()</code>", but I'm hoping there's a cleaner way, like same special character in the string you pass to open() or file().</p>