title: What does "Mark directory as sources root" really do?
body: <p>In Pycharm, if you right click in a folder inside your project, you can mark it as <code>sources root</code>, so then you can import modules from this folder and subfolders.</p>
  
  <p>However doing it this way will only make your program runnable inside Pycharm, if I try to execute from outside Pycharm (eg from the console) it will complain that certain modules are not found, which is the problem that I'm facing.</p>
  
  <p>If I mark a certain folder as sources root my program runs fine, but I need to understand what does it do so I can configure the program to find this modules even if not using Pycharm.</p>
  
  <p>I want to know what does this option exactly do, and how can I get the same behaviour without using it.</p>
  
  <p>It is just adding a <code>__init__.py</code> file in the root folder? 
  Is it doing something like:</p>
  
  <pre><code>import sys
  sys.path.insert(0, my_folder)
  </code></pre>