title: Python File Structure on GitHub
body: <p>I've been looking around at some open source projects on Python, and I'm seeing a lot of files and patterns that I'm not familiar with.</p>
  
  <p>First of all, a lot of projects just have a file called <code>setup.py</code>, which usually contains one function: </p>
  
  <pre><code>setup(blah, blah, blah)
  </code></pre>
  
  <p>Second, a lot contain a file that is simply called <code>__init__.py</code> and contains next to no information. </p>
  
  <p>Third, some <code>.py</code> files contain a statement similar to this: </p>
  
  <pre><code>if __name__ == "__main__"
  </code></pre>
  
  <p>Finally, I'm wondering if there are any "best practices" for dividing Python files up in a git repository. With Java, the idea of file division comes pretty naturally because of the class structure. With Python, many scripts have no classes at all, and sometimes a program will have OOP aspects, but a class by class division does not make that much sense. Is it just "whatever makes the code the most readable," or are there some guidelines somewhere about this? </p>