title: How can I load a files into a project so that I can open it on any machines without having to correct the file pathway? (working on PYcharm)
body: <p>I'm working on a small personal project at the moment, where the user will input a string to look for into a given .txt file, and if the string is found, the program will display the next substring. I've got the core part figured out. </p>
  
  <p>but I'm coding on my main computer but want to run this app on a raspberry-Pi, and I'm quite lost as how I could include the file into the directory and makes my pathway from within the directory to import and open the file. So here I am asking your help on that matter!  </p>
  
  <p>something strange is happening when I try to open the .txt files, pycharm tells me: </p>
  
  <pre><code>C:\Users\xavie\PycharmProjects\untitled1\venv\Scripts\python.exe "C:\Users\xavie\PycharmProjects\untitled1\dico\Dictionnaire Mandoa.py"
  Traceback (most recent call last):
    File "C:\Users\xavie\PycharmProjects\untitled1\dico\Dictionnaire Mandoa'.py", line 1, in &lt;module&gt;
      f=open('dicotest.txt','r')
  FileNotFoundError: [Errno 2] No such file or directory: 'dicotest.txt'
  </code></pre>
  
  <p>while I do have the said files as this screenshot  shows<a href="https://i.stack.imgur.com/0ogGd.jpg" rel="nofollow noreferrer">screenshot of repository</a></p>