title: Example of how to use msilib to create a .msi file from a python module
body: <p>Can anyone give me an example of how to use python's <a href="http://docs.python.org/library/msilib.html" rel="nofollow noreferrer">msilib</a> standard library module to create a msi file from a custom python module?</p>
  <p>For example, let's say I have a custom module called cool.py with the following code</p>
  <pre><code>class Cool(object):
      def print_cool(self):
          print &quot;cool&quot;
  </code></pre>
  <p>and I want to create an msi file using msilib that will install cool.py in python's site-packages directory.</p>
  <p>How can I do that?</p>