How to use the py2exe.Distribution.__init__ function in py2exe

To help you get started, we’ve selected a few py2exe examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github twisted / twisted / sandbox / moonfallen / ntsvc / command.py View on Github external
display=short_name, 
                                reactortype='default',
                                cftype='python',
                                basecf=config)
        if os.path.dirname(self.twisted['basecf']) != '':
            raise ValueError("Directory names not allowed for "
                             "the application file: %s" % 
                                   (self.twisted['basecf'],))
        attrs['service'] = [{'modules': ['ntsvc.runner'], 
                             'dest_base': '%sctl' % (short_name,),
                             }]
        attrs.setdefault('data_files', []).append(
                ('', [config, 'ntsvc.cfg'])
                         )

        py2exe.Distribution.__init__(self, attrs)