title: How does one parse a .lua file with Python and pull out the require statements?
body: <p>I am not very good at parsing files but have something I would like to accomplish.  The following is a snippet of a .lua script that has some require statements.  I would like to use Python to parse this .lua file and pull the 'require' statements out.</p>
  
  <p>For example, here are the require statements:</p>
  
  <pre><code>require "common.acme_1"
  require "common.acme_2"
  require "acme_3"
  require "common.core.acme_4"
  </code></pre>
  
  <p>From the example above I would then like to split the directory from the required file.  In the example 'require "common.acme_1"' the directory would be common and the required file would be acme_1.  I would then just add the .lua extention to acme_1.  I need this information so I can validate if the file exists on the file system (which I know how to do) and then against luac (compiler) to make sure it is a valid lua file (which I also know how to do).</p>
  
  <p>I simply need help pulling these require statements out using Python and splitting the directory name from the filename.</p>